Category: Widget
Resource links
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

How Do I Upload Multiple Files to S3?

Issue

When using the filepicker widget, how do I upload multiple files to S3?

Resolution

Multiple files can be read via the Filepicker widget at a time. If say you have 5 files read by the Filepicker widget then you can create a submit button and configure the onClick event to iterate from 0 to 4 i.e. indexes for the files in the Filepicker widget and invoke your upload query like
{{ upload_query.run(undefined, undefined, { fileIndex: i }) }}

In the upload query, you can reference the ith file like:
{{ FilePicker1.files[this.params.fileIndex].data }}