Getting Started

Filestack Architecture

File Upload

File Export (Save To)

Responsive Images

Image Transformations

Document Transformations

Video Transcoding

Audio Transcoding





Filestack Viewer


Supported Cloud Drives

Filestack Recipes

Filestack Integrations

Filestack SDKs

Register for an API key

Store a File with the REST API

Similar to the call in javascript, you can use the Filepicker files library to send files directly to your S3 bucket and get back a Blob for further operations. To do this, issue a POST to the /api/store/S3/ endpoint, along with your apikey, the file, and an optional filename parameter.

Sample Code
>>> curl -X POST -F fileUpload=@filename.txt
{"url": "", "size": 234, "type": "text/plain", "filename": "tester.txt", "key": "1ilWxmaRRqhMd2vSbSyB_tester.txt"}
Sample Code
>>> curl -X POST -d url=""
{"url": "", "size": 8331, "type": "image/png", "filename": "watermark.png", "key": "a1RyBxiglW92bS2SRmqM_watermark.png"}
Sample Code
>>> curl  -X POST  -d  url=""  ""
{"container": "custom_source", "url": "", "filename": "watermark.png", "key": "myfiles/1234.png", "type": "image/png", "size": 8331}

REST parameters names are exactly the same like Javascript ones.

If you set additional parameters make sure that the URL is given in quotes.



The name of the file as it will be stored. If this isn't provided, we do the best we can to come up with one.



Set store parameter directly after slash. Where to store the file. The default is S3. Other options are 'azure', 'dropbox', 'rackspace' and 'gcs'. You must have configured your storage in the developer portal to enable this feature.

S3, Rackspace, Azure, Dropbox and Google Cloud are only available on paid plans. Choose Plan


The type of the file as it will be stored. If this isn't provided, we do the best we can, defaulting to "text/plain" if you give us raw data.



The path to store the file at within the specified file store. For S3, this is the key where the file will be stored at. By default, Filestack stores the file at the root at a unique id, followed by an underscore, followed by the filename, for example "3AB239102DB_myphoto.png".



The bucket or container in the specified file store where the file should end up. This is especially useful if you have different containers for testing and production and you want to use them both on the same Filestack app. If this parameter is omitted, the file is stored in the default container specified in your developer portal.

Note that this parameter does not apply to the Dropbox file store.

Public Access


Indicates that the file should be stored in a way that allows public access going directly to the underlying file store. For instance, if the file is stored on S3, this will allow the S3 url to be used directly. This has no impact on the ability of users to read from the Filestack file URL. Defaults to 'private'.

Base64 Decoding


Specify that you want the data to be first decoded from base64 before being written to the file. For example, if you have base64 encoded image data, you can use this flag to first decode the data before writing the image file.



If you have security enabled, you'll need to have a valid policy and signature in order to perform the requested call. This allows you to select who can and cannot perform certain actions on your site. Read more about security and how to generate policies and signatures