0
votes

I have made a simple app with a form which gets user info and their image, when they submit form it saves data on google datastore and image in google cloud storage.

To use cloud storage space efficiently i want to upload resized(smaller) image on cloud storage, but as of now i couldn't found a solution for that, because GAE doesnt allow local storage to process image(for resizing).

Can you suggest any solution to use GCS space efficiently?

one solution i tried is to upload the image again using resized url(getImageServingUrl) and then delete the primary/first image, but i think its not very efficient way to do this task, as it will use server processing time.

1
resize it in the browser before upload then or rezise it in GAE before sending it to the bucket.Paul Collingwood
can you explain it further, how to resize it in browser without server interaction, and how can i resize image in GAE?Rizwan Yahya
ajaxblender.com/… php.net/manual/en/imagick.resizeimage.php GAE comes with it's own image rezising tools in Python (PIL) I don't know about PHP.Paul Collingwood

1 Answers

0
votes

GAE now support ImageMagick (Version 1.9.18 - February 19, 2015) so you can use this extension to re size the image and then upload

https://code.google.com/p/googleappengine/wiki/SdkReleaseNotes

however if you need to get image re sizing at run time here is the way object_image_url = CloudStorageTools::getImageServingUrl($object_image_file, ['size' => 400, 'crop' => true]);