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

Reading data from IO object #64

Closed zeitnot closed 4 years ago

zeitnot commented 4 years ago

As far as I know this gem does not support reading data from IO object. It only accepts file path. Most of the time we produce the content on the memory so we do not have physical file. Filestack gem forces us to save this data on the disk then giving the file path. This hurts the performance due to many system calls. It would be very nice if it supports to accept an IO object like the following.

  file = StringIO.new
  client = FilestackClient.new(ENV['KEY'])
  file_link = client.upload(io: file)
zeitnot commented 4 years ago

Is there any progress for this issue?

gabifija commented 4 years ago

@zeitnot Thank you for the comment. I'll add it soon.

gabifija commented 4 years ago

@zeitnot I've added IO object upload to filestack 2.8.0. I hope it helps. But please let me know if you face any issues. Happy to help.

zeitnot commented 3 years ago

@gaaabiko Many thanks.