1

I have been hosting my Django backend service on Google App Engine for the past couple years and it has auto-scaled beautifully. Recently however, I have run in into an interesting roadblock.

Use case: Mobile users upload videos/images to my Django App Engine backend via multipart/form data. Thumbnails are extracted from the videos and all the media received is then saved into Google Cloud Storage. This worked perfectly until I tested uploading a longer video. Strangely, app engine did not even register the request. I have tried various times with various videos all longer than 30 seconds and encountered the same anomaly.

Apparently, the culprit is that App Engine blocks requests greateer than 32MB. Is this the end of the world for video upload to google cloud storage?

Is there anyway to change this 32MB limit? Or am I stuck with forcing users to upload media only under 32MB?

Rage
  • 870
  • 9
  • 27

1 Answers1

0

As described in the public documentation(https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled) the maximum request size is 32Mb in App Engine.

What you can actually do and what you should do always is to make the users upload the files directly into Google Cloud Storage. This will remove this “blockage” for you

Chris32
  • 4,716
  • 2
  • 18
  • 30
  • The problem with uploading directly to Cloud Storage, as I see things, is that I will not be able to directly reference the file in my database. Am I wrong? – Rage Jul 04 '20 at 18:41
  • You can create a Cloud Function triggered by this create event in Storage and this can make the reference in your database.Does this approach looks good to you? – Chris32 Jul 04 '20 at 19:05
  • Oh I see. Save the file directly to Cloud Storage with a distinct name like LKasdfJHSLsdSGdddo7t087Dhuijkka.mp4. And then when the upload is successful I send the name to my backend server to store the name for retrieval. – Rage Jul 04 '20 at 20:28
  • My mobile frontend is iOS only, hopefully there is support for Swift – Rage Jul 04 '20 at 20:34
  • I believe there is [support for http requests in Swift](https://stackoverflow.com/questions/24016142/how-do-i-make-an-http-request-in-swift) – Chris32 Jul 05 '20 at 11:53
  • Yup, got everything working smoothely through Firebase Cloud Storage. Strangely though, my objects in regular Cloud Storage seem corrupted. – Rage Jul 05 '20 at 21:49
  • In that case I would recommend you to contact withthe Google Cloud support! – Chris32 Jul 05 '20 at 22:12