After a file is uploaded you are able to call on the file resource to manipulate or transform the file in many ways with our API.  Currently there are two methods to work with files, our client side transformations which can be carried out within our Filestack Picker Modal, or our backend transformations which can be worked on and completed independently of the picker modal.

Our client-side transformations can be added into the picker as another set of parameters within the picker options- similar to what is seen in the example below:

const client = filestack.init('Your_API_Key');
const options = {
  rotate: {
    deg: 90
  }
};
client.transform('url', options);

In this case, the above code is giving the user the option of rotating an image by 90 degrees per click of the rotate button within the picker.  You can also add the ability to crop as well- as a few other transformation options- all of which are currently shown here: https://www.filestack.com/docs/javascript-api/transform-v3.   Other parameters like our ‘force crop’ require all images to be cropped prior to being uploaded, or force a specific aspect ratio to be used for the crop.

Our backend transformations allow the user a larger selection of our transformation catalog, shown here: https://www.filestack.com/docs/javascript-api/pick-v3 .  This enables you to use the watermarking feature, filters, collages, and file conversions as you would need.  These transformations also extend to documents as well, allowing for a wide range of document conversions and compression options for your users.  We also have a selection of video and audio transformations that can be run, documentation on each shown here:https://www.filestack.com/docs/video-transformations and here: https://www.filestack.com/docs/audio-transformations.  These transformations will generally need a filestack handle to be run, however, they can also be run on external URLs with the use of your API Key, like so: https://process.filestackapi.com/ANdpKX6pWRIevNAWvvOOtz/security=policy:eyJleHBpcnkiOjE3NjQ1MzYwMjR9,signature:9bb689d6aacfe5757af84c204299fa6654a4e7c89e89c29aff8457cf716211e6/rotate=deg:90/https://www.filestackapi.com/api/file/ajTW5xm2Sd6v22yrtKmQ?policy=eyJleHBpcnkiOjE3NjQ1MzYwMjR9&signature=9bb689d6aacfe5757af84c204299fa6654a4e7c89e89c29aff8457cf716211e6

Did this answer your question?