Skip to content
Advertisement

How to upload files >32mb via Google Cloud Run

I implemented a Cloud Run process in Java with Spring Boot which consumes file uploads via HTTP. The uploaded files are sometimes over 32 MB in size. I know that 32mb is the fixed single-request limit under Cloud Run. The documentation of Cloud Run mentions two approaches to support the upload of larger files.

  • Resumable upload and
  • XML API multipart upload

I have no idea how to implement one of these approaches in Spring Boot. To me, it seems like the Google Storage API doesn’t provide methods for this. Am I missing something?

Advertisement

Answer

By sending your requests directly to Cloud Storage instead of having them routed through Cloud Run, you’ll be able to bypass this limit. The two main ways to do this are signed URLs or signed post policy URLs. There’s also a blog post that talks a little more about them here.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement