<img height=1 width=1 style=display:none src="https://q.quora.com/_/ad/b8e22267a87d46459afc78849486c9e6/pixel?tag=ViewContent&noscript=1">Documentation - Retrieve

Retrieve Files

Once a file has been uploaded you can use the retrieve method to get file metadata or the file itself.

You can add Filestack to your project quickly and easily using our CDN.

Or by installing Filestack-JS using NPM

You will need to instantiate the client with your API key and security or CNAME if they apply to you.

You may pass in an optional dictionary of key-value pairs to customize the options of client.retrieve()

const client = filestack.init('Your_API_Key');
client.retrieve(handle, options);

Retrieve Options

An optional dictionary of key-value pairs that specify how the picker behaves.

Metadata Boolean

metadata: true

Specifies that you want the metadata of the file returned as a JSON object.

Head Boolean

head: true

Specify that you would like to perform a 'head' request instead of the standard 'get'.

Download Boolean

dl: true

Specify that you would like the entire file to be returned.

Extension String

extensions: '.jpg'

Add an extension to the handle when making the 'get' request.