Reputation:
I have image URLs like http://example.com/someimage.png - how do I fetch that image and save it with Blob? Thanks.
Upvotes: 0
Views: 1381
Reputation: 691645
Here's example code from the documentation showing how to write a file to the blobstore. You'll have to use a stream instead of a writer, since a PNG image is binary, and you'll have to set the appropriate content type, but it should show you the way.
And here's the UrlFetch documentation, explaining how to get some available resource on the web, using HTTP.
Upvotes: 1