jcdmb
jcdmb

Reputation: 3056

Compressing uploaded image using GAE (and GWT)

I have a classic problem, and (the whole day long) I could not find a solution for it.

I want my users to send me pictures (max 5 MB), and I have to store them using the Blobstore from GAE.

As I can only store max. 1 MB Pictures, I would like to allow the users to send bigger pictures (max 5MB as said before) and process the pictures on the client or on the server side to compress them and store them using the blobstore. My first try was:

1) I sent a 1,5 MB Picture to the server, and tryed to resize it using the native Image-Processing Framework from GAE, but I've gotten following error message: The request to API call images.Transform() was too large.

So, I would like to ask you guys what would be the bets method to comprees and store the uploaded pictures. Could I also do it on the client side, using GWT, before sending it to the server?

Thanks in advance for answering.

Upvotes: 0

Views: 1070

Answers (2)

Nick Johnson
Nick Johnson

Reputation: 101149

Blobstore allows files of up to 2GB; if your users are uploading images, you can simply have them upload them directly to the blobstore, regardless of what size they are.

Upvotes: 1

Peter Knego
Peter Knego

Reputation: 80340

Blobstore max object size is 2GB, but max size you can get/put in one API call is 1MB.

The solution is to divide a file into a series of chunks.

There is an app called AppImage that does exactly this. You can read about it in: Large Image Resizing for Google App Engine

Upvotes: 1

Related Questions