JR Galia
JR Galia

Reputation: 17269

Image from Internet to AppEngine BlobStore (Java)

I have uploading of pictures in an appengine application. Pictures was saved in blobstore. It uses the html input file.

In addition to that, I want to allow users to save pictures from the internet to the blobstore. If the user have url of a valid picture, I want the picture to be save in blobstore. Is it possible? How to implement this functionality?

e.g. The user will just input url ex. http://domain.com/picture001.jpg then image will be stored in blobstore. Not just the url the picture itself.

Thanks

Upvotes: 1

Views: 234

Answers (1)

Stuart Langley
Stuart Langley

Reputation: 7054

Use URLFetch to retrieve the image bytes and then use the Files API to write the bytes you fetched to the blobstore.

Upvotes: 4

Related Questions