Formsort
Search…
S3
Upload files and images directly into your own S3 buckets.
When collecting binary data from your flows, such as images or documents from file, image, or signature questions, we upload them directly into your infrastructure from the responder's browser.
The answer associated with the question will contain the Object URL of the uploaded asset, such as https://s3.amazonaws.com/{{YOUR_BUCKET_NAME}}/formsort/{{FILENAME}}.jpg
This way, you retain control over your responder's data: the S3 bucket can only provide write access to Formsort, so the data uploaded can be secure.

Setting up new S3 credentials

(If you don't have one already, or wish to create a new one) Create an S3 bucket on AWS. Take note of the bucket name as well as the region (ie. us-east-2) of the bucket. Configure the "bucket owner preferred" setting so all new objects in the bucket will be owned by your organization.
In the integrations editor, under S3, click Add new credential...
Provide your bucket name, region, and a description of the bucket
In the S3 interface, add a bucket policy to allow the Formsort uploader user to write to the bucket:
1
{
2
"Version": "2012-10-17",
3
"Id": "FormsortPolicy",
4
"Statement": [
5
{
6
"Sid": "FormsortPutObjectsPolicy",
7
"Effect": "Allow",
8
"Principal": {
9
"AWS": "arn:aws:iam::129119527019:user/s3-upload"
10
},
11
"Action": [
12
"s3:PutObject",
13
"s3:PutObjectAcl"
14
],
15
"Resource": "arn:aws:s3:::{{YOUR_BUCKET_NAME}}/formsort/*"
16
}
17
]
18
}
Copied!
Since we'll be uploading from the user's browser, you need to set a CORS policy as well.
JSON schema:
1
[
2
{
3
"AllowedHeaders": [
4
"*"
5
],
6
"AllowedMethods": [
7
"POST",
8
"GET"
9
],
10
"AllowedOrigins": [
11
"*"
12
]
13
}
14
]
Copied!
XML schema (deprecated in AWS):
1
<?xml version="1.0" encoding="UTF-8"?>
2
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
3
<CORSRule>
4
<AllowedOrigin>*</AllowedOrigin>
5
<AllowedMethod>POST</AllowedMethod>
6
<AllowedHeader>*</AllowedHeader>
7
</CORSRule>
8
</CORSConfiguration>
Copied!

How Object URLs are generated

All uploaded assets will reside within a formsort/ folder.
At the level of the flow's integration, a base path can be specified. This adds an additional prefix that is used to create Object URLs for all uploaded assets. One helpful trick is to create a base path like /prod for the production environment, to distinguish from assets uploaded to other environments.
At the level of a particular question, additional filename patterns can be specified:
Specifying a file destination
Take care that every URL has some uniqueness to it, whether it be the responder UUID, a timestamp, or random UUID, so that uploads from different responders do not overwrite one another.
In the above configuration, uploaded assets would be located at https://s3.amazonaws.com/your.aws.s3.bucket/formsort/{{randomUuid}}.png, which is what would be provided in the answers stored in the flow itself.
Last modified 2mo ago