Question

I'm trying to upload a file to via Google ruby API client. This works

media = Google::APIClient::UploadIO.new('test.jpg', 'image/jpeg')

but this does not work

media = Google::APIClient::UploadIO.new('http://www.somedomain.com/test.jpg', 'image/jpeg')

How would i upload media from a remote server such as s3?

Was it helpful?

Solution

I could not find the solution i wanted to this question. I ended up using Ruby Tempfile class which will download external files to my server in a temp folder and delete garbage collect once its done.

There is a great explanation of how to use this class here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top