Programmatically Download Image to Desktop from Remote App with Ruby?

Posted by viatropos on Stack Overflow See other posts from Stack Overflow or by viatropos
Published on 2010-04-05T06:29:33Z Indexed on 2010/04/05 6:33 UTC
Read the original article Hit count: 264

Filed under:
|
|

I was thinking about making a little crop/resize batch processor online, and wanted to know if there was a way for me to do the following:

  • upload image and specify dimensions
  • click "process" and app resizes image
  • image downloads automatically to wherever it was I uploaded it (say from my desktop), but with a new name (based on the time for example).

This would make it so I could host a free image processor that never stored any data other than tempfiles.

Is that possible? Something like Rails' send_file method, but I'm using Sinatra and am looking for something in pure ruby.

© Stack Overflow or respective owner

Related posts about file-transfer

Related posts about ruby