Remove Files

Once a file has been uploaded you can use the remove method to delete the file handle and remove it from your storage location.

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 must have security entered into the init function and pass in a handle toclient.remove()

Read more about using security with the client on our security docs.

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

Handle Removal

Handle (Required) String

'handle'

The Filestack handle for the file to be removed.

Removal example

const client = filestack.init('YourKey', {
  policy: 'YourPolicy',
  signature: 'YourSignature'
});

client.remove('YourHandle');