Functions
/
File Object Types
Getting Started
Tutorials
Datasources
Functions
Spaces
Queues
Automations
Components
Self Hosted
Settings
REST API

File Object Types

For information about binary objects, see this document.

Files as Inputs

In addition to text-based formats for form inputs, Internal supports file inputs. The first is more generic and only needs to be of type "file." To make use of this feature, create your input in the configuration menu, navigate to the "Inputs" tab, and select "File Object" as the "Type" for that input. A file uploader will then appear in the configuration menu under the "Configure" tab, as well as in the published form in your Space. This input will require a valid "file object" type.

Binary File Object

One can also use a binary file as the input type. This could be used as a way to pull application binaries from one server to another for deployment, or as a way to archive application binaries post CI/CD. One selects it like the would select "File Object." We have a whole section on Binary file types here.

Binary HTTP Body

It is possible to send a binary via HTTP body. Define an X-header key for the file ("X-Filename") and give it a variable to pass to the body of the request. In the case below, we used "myfile."

In the body of the request, we use that variable to pull in the object (whose type is defined in the "Inputs" tab -- see below) and grab its name: "myfile.name." We wrap it as aJavaScript string literal (${}) so that the function can be used in Spaces and include the variable "myfile."

Be sure to set the parameter to type "File Object" in the "Inputs" tab of the function editor (as below)