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 the Contents of a URL - Save a Copy of the File Located at a Specific URL

In addition to storing files and raw data, you can store the contents of URLs directly as well.

Please Note: The parameter that specifies the bucket to store files in when using the method is container and not storeContainer like in filepicker.pickAndStore.

Sample Code
console.log('Storing...'); filepicker.storeUrl( "", {filename: 'cloud.png'}, function(Blob){ console.log(replaceHtmlChars(JSON.stringify(Blob))); } );


filepicker.storeUrl(URL, [options], onSuccess(Blob){}, onError(FPError){}, onProgress(percent){})
input The URL that points to the data to store, as a string

An optional dictionary of key-value pairs that configure how to store the data.


{filename: 'MyCoolPhoto.png'}

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.


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


{path: '/myfiles/1234.png'}

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

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", for example.


{container: 'user-photos'}

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.


{storeRegion: 'us-east-1'}

The region where your storage container is located. This setting currently applies only to S3 buckets. If you are using a different bucket and region than the one you set up in your developer portal you can pass the storeRegion as part of your store options. If this parameter is not set we will do our best to determine the region your S3 bucket is located so that we can properly authenticate our connection request. You can find a list of the S3 regions here: in the "region" column.

Base64 Decoding

{base64decode: true}

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.


{policy: POLICY, signature: SIGNATURE}

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


The function to call if the store is successful.

We'll return a Blob as a JSON object with the following properties.

url The core Filestack file url on which all other operations are based.
filename The filename of the uploaded file.
mimetype The mimetype of the uploaded file.
size The size of the uploaded file in bytes, if available.
isWriteable Whether the file can be written to using filepicker.write.

The function to call if there is an error when storing the file.

Possible error codes on the FPError:

151 The file store couldn't be reached
152 The remote URL couldn't be reached

For more info about FPErrors, see Error Handling.


The function that is called on progress events, if available. The function is called with the percent completed as a number out of 100.

Note that on older browsers, particularly IE 8 and IE 9, the browser does not provide progress events and therefore onProgress will not be called except at 100%.