質問

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?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top