filestack / filestack-ruby

Official Ruby SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
34 stars 27 forks source link

How to work with already uploaded images? #8

Closed jlerpscher closed 7 years ago

jlerpscher commented 7 years ago

Hi,

Is it possible to works with files already uploaded on filestack's servers (eg. via the javascript client)?

I would like to perform some operations in background, like resizing or rotating images. I have started few days ago an API wrapper for performing transform operation via the filestack's REST API (https://process.filestackapi.com) but maybe it will be a kind of duplication comparing to your gem?

What is the exact purpose of this gem?

Thank you

staturecrane commented 7 years ago

@jlerpscher Yes, that would be duplicating the purpose of this gem, which is to wrap the Filestack API, including its image transformation engine.

If you would like to work with already uploaded files, you just need to import and initialize a Filelink object.

filelink = Filelink.new('YOUR_HANDLE', security: 'YOUR_SECURITY')
transform = filelink.transform.resize(width:100,height:100)
jlerpscher commented 7 years ago

Perfect 👍

Thank you!