Upload files
Upload file\(s\) to the given URL\(s\)
Upload file(s) to the given URL(s).
This flow function takes in a list of file objects - the file objects contain the upload URL.
The first output is triggered if all of the files were uploaded successfully.
The second output is triggered if at least 1 of many files fail to upload.
The third output is triggered if all of the file uploads fail.

Input arguments

Label
Key
Type
Required?
Default
Description
HTTP method
method
String
Yes
PUT
HTTP method to use.
Headers
headers
Object
No
Headers to include in the HTTP call e.g. storage key.
Files to upload
filesToUpload
Array
Yes
List of files that have uploadUrl property.

Output arguments

Number of outputs: 3
Label
Key
Type
Description
Upload job ID
jobId
Number
Unique job ID for the upload.
Uploaded files
files
Array
Object describing the cached file in the local filesystem
    MIME type
files.mimeType
String
File MIME type
    Size
files.size
Number
File size in bytes
    Filename
files.name
String
File filename
Uploaded files
erroredFiles
Array
Object describing the cached file in the local filesystem
    MIME type
erroredFiles.mimeType
String
    File size
erroredFiles.size
Number
    File name
erroredFiles.name
String
Uploaded files
succesfulFiles
Array
Object describing the cached file in the local filesystem.
    MIME type
succesfulFiles.mimeType
String
    File size
succesfulFiles.size
Number
    File name
succesfulFiles.name
String

Events

Label
Key
Description
Properties
File upload progress
onFileUploadProgress
Triggered when the file upload progresses.
jobId, totalSize, bytesUploaded, files

Errors

Label
Code
Description
Unknown error
unknown
Thrown when trying to upload the files resulted in an unknown error.
All files failed
allFilesFailed
Thrown if all of the files you are trying to upload fail
No files to upload
noFilesToUpload
Thrown if there are no files to upload
Last modified 5mo ago
Export as PDF
Copy link