Basic Uploads

Beyond the picker widgets, Filestack still offers easy ways to get files uploaded and ready for delivery.

If all you need is one HTTP request from file to cloud then Filestack can help. The Filestack File API provides several methods for uploading files over HTTP:

Upload file

Sample request:

curl -X POST -F fileUpload=@filename.txt "https://www.filestackapi.com/api/store/S3?key=MY_API_KEY"

Sample response:

  "url": "https://cdn.filestackcontent.com/HLOon3NcTS6w7rqyZ3ei",
  "size": 234,
  "type": "text/plain",
  "filename": "filename.txt",
  "key": "1ilWxmaRRqhMd2vSbSyB_filename.txt"

Upload from URL

Sample request:

curl -X POST -d url="https://assets.filestackapi.com/watermark.png" "https://www.filestackapi.com/api/store/S3?key=MY_API_KEY"

Sample response:

  "url": "https://cdn.filestackcontent.com/api/file/s7tdGfE5RRKFUxwsZoYv",
  "size": 8331,
  "type": "image/png",
  "filename": "watermark.png",
  "key": "a1RyBxiglW92bS2SRmqM_watermark.png"

Multipart Uploads

A more robust uploading flow is available through the Filestack Upload API and available to use in our API Clients. Use of this API outside of our clients is currently not supported by our SLA.

By default all Filestack applications using multi-part uploads will use Filestack S3 as the storage backend. When using your own S3 bucket as a storage backend the uploads will be sent directly to your bucket from the client, but make sure you configure your S3 bucket first.

Other storage backends are supported for multi-part uploads, but they are not direct because all files go to Filestack S3 initially and are transferred to your own storage in the background. Upload webhooks are helpful in this case to notify you when background transfers are complete.

Content Ingestion Network

The Content Ingestion Network utilizes an array of global edge servers that serve as shortest-hop points for you and your customer’s upload requests. This is made possible by the availability of our services across AWS regions. This feature can be enabled on your application without any extra configuration. However, if you are using your own S3 bucket you will need to configure it to support the Filestack CIN.

Using the CIN, as soon as a file is uploaded it goes to the nearest Filestack ingestion point accessible to the user and a filelink is created. The filelink can be used immediately, even as the CIN moves the file to its final location (our storage or yours).

The metadata call on your file will return a file status. Here are the three potential file status values that will be returned:

  • Started: file has begun uploading to the nearest POP
  • In Transit: file has hit the POP and is available but has not yet hit final storage destination.
  • Complete: file has been fully uploaded to the final storage destination.

Intelligent Ingestion

When Intelligent Ingestion is enabled on your application, our Upload API adds support for adjusting the multi-part parameters on the fly. Our API clients have the ability to determine poor network conditions, such as on mobile networks or networks with sub-standard or limited QoS.

For applications with FII enabled, uploaded parts that time out are re-chunked and tried again until the minimum chunk size is reached. This ensures that QoS constraints or spotty network conditions do not cause a failure of the entire upload.

Without FII enabled the API client retry logic may usually be enough to ensure a part gets uploaded, but if the part size is too large for the network conditions then the retried part will keep failing. FII adds an adaptive multi-part flow to help resolve these kinds of use cases.

For example, if using our Javascript API client, you will need to enable the intelligent option. This feature will not work if FII is not enabled for the application.

Please contact sales if you would like to inquire about enabling this.

Cloud Uploads

Only available through our pickers, this feature allows you to upload files from your users’ cloud provider accounts. These are powered by our proprietary Cloud API and offer the same storage options for local file uploads.

Users will be asked to authorize the Filestack OAuth clients in the picker UI, but you can use your own OAuth clients if your account plan supports it.

Use of the Cloud API outside of the pickers is not supported by our SLA.