Transformations - Storing the Results

Save a copy of your transformation using the Store task

Note: The maximum accepted image size is 100,000,000 pixels. An image with this many pixels could have width and height combinations like 10,000 x 10,000 or 5,000 x 20,000, etc. There is also a file size restriction. Filestack will not convert an image that is larger than 256mb. Please contact us if you require the ability to process larger files than our current limits.

The Store function lets you store a copy of the transformation results to your preferred filestore when you do a POST against a process.filestackapi.com url. In response to this post, Filestack will return a new blob with the Filestack url for the new image and its corresponding metadata.

Store Task URL Formats:
https://process.filestackapi.com/store=[options]/Filestack_FileLink_Handle
or
https://process.filestackapi.com/<API_KEY>/store=[options]/File_URL
store
String

Root task cannot be abbreviated

Pass store by itself and the file will be saved using your API key defaults and a new Filestack link will be returned.

store=filename:name_of_the_file
String

Can be abbreviated as f:your_filename

Change or set the filename for the converted file.

store=location:S3
String

Can be abbreviated as l:S3

The storage location to save the file to. Defaults to S3. Other options include dropbox, azure, rackspace and gcs.

store=path:"some/path/"
String

Can be abbreviated as p:"backup/photos/"

Where to store the file in your designated container. 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". If the provided path ends in a '/', it will be treated as a folder, so if the provided path is "myfiles/" and the uploaded file is named "myphoto.png", the file will be stored at "myfiles/909DFAC9CB12_myphoto.png". If a full path (not ending in '/') is provided, then the path will be the exact location and key that the file is written to. If the path contains no / characters, then no double quotes are needed.

store=container:my_bucket
String

Can be abbreviated as c:my_bucket

The name of the bucket or container to write files to.

store=region:us-east-1
String

Can be abbreviated as r:us-east-1

S3 specific parameter. The name of the S3 region your bucket is located in. All regions except for eu-central-1 (Frankfurt), ap-south-1 (Mumbai), and ap-northeast-2 (Seoul) will work.

store=access:public
String

Can be abbreviated as a:private

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'.

store=base64decode:true
Boolean

Can be abbreviated as b:false

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. The default is false.

Store Examples

Original image

original photo to be converted and stored with Filestack's processing engine store task

Photo Courtesy of Andrew Mione

Using the POST method to store a transformation with only default storage parameters (no store task parameters required):

We have coordinates that will crop the cactus flower [301,269,1226,1100] and want to save a copy of the transformation. Using cURL We do a POST with the "URL globbing parser" turned off to accomodate the crop dimensions.

Store CURL Request with Filestack Handle
>>> curl -X POST -g "https://process.filestackapi.com/crop=dim:[301,269,1226,1100]/oCy2g45WSymRCKoCa0aP"
Store CURL Request with External URL
>>> curl -X POST -g "https://process.filestackapi.com/AuSv4FudVRheqTxmY0NDgz/crop=dim:[301,269,1226,1100]/https://d1wtqaffaaj63z.cloudfront.net/images/P5305990_resized.jpg"

The response you receive will be like the standard JSON blob Filestack returns after using the filepicker.store() method.

returned JSON blob:

{"container":"filestack-web-demo","filename":"P5305990_resized.jpg","height":1100,"key":"OtXUShT4Qj6jbWWjtrGM_P5305990_resized.jpg",
"size":246360,"type":"image/jpeg","url":"https://cdn.filestackcontent.com/MZuUxxy4TJG8dFMp3IIO","width":1226}
        
image transformed with the crop task and stored as a new image

Using the POST method to store a transformation with custom storage parameters:

We will use the same cropping parameters but add additional store parameters and the monochrome filter. Using cURL We do a POST with the "URL globbing parser" turned off to accomodate the crop dimensions.

Store CURL Request with Filestack Handle
>>> curl -X POST -g "https://process.filestackapi.com/store=container:filestack-web-demo,location:S3,region:us-east-1,path:\"my/custom/path/\",filename:custom_flower_crop.jpg/crop=dim:[301,269,1226,1100]/monochrome/oCy2g45WSymRCKoCa0aP"
Store CURL Request with External URL
>>> curl -X POST -g "https://process.filestackapi.com/AuSv4FudVRheqTxmY0NDgz/store=container:filestack-web-demo,location:S3,region:us-east-1,path:\"my/custom/path/\",filename:custom_flower_crop.jpg/crop=dim:[301,269,1226,1100]/monochrome/https://d1wtqaffaaj63z.cloudfront.net/images/P5305990_resized.jpg"

The response you receive will be like the standard JSON blob Filestack returns after using the filepicker.store() method.

returned JSON blob:

{"container":"filestack-web-demo","filename":"custom_flower_crop.jpg","height":1100,"key":"my/custom/path/zRlaKRWwQAmaMSGo3nfR_custom_flower_crop.jpg",
"size":215693,"type":"image/jpeg","url":"https://cdn.filestackcontent.com/lv3P2Q4QN2aluHLGhgAV","width":1226}
        

Stored, cropped and desaturated image:

https://cdn.filestackcontent.com/lv3P2Q4QN2aluHLGhgAV
image transformed with the crop and monochrome tasks and stored as a new image