Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload files larger than 10mb via google cloud http functions. ? Any alternative options?

I have made a google cloud function to upload the file into google bucket and returns signed URL in response.

Whenever large files (more than 10mb) uploaded. It is not working. It works fine for files less than 10mb.

I have searched and see in cloud documentation. It says max data sent size is 10mb for HTTP functions not allowed to increase size.

resource: {…}  
 severity:  "ERROR"  
 textPayload:  "Function execution could not start, status: 'request too large'"  
 timestamp:  "2019-06-25T06:26:41.731015173Z"  

for successful file upload, it gives below log Function execution took 271 ms, finished with status code: 200

for large files, it gives below log Function execution could not start, status: 'request too large'

Are there any alternative options to upload file in the bucket using API? Any different service would be fine. I need to upload file up to 20mb files. Thanks in advance

like image 473
Devarsh Patel Avatar asked Oct 22 '25 09:10

Devarsh Patel


1 Answers

You could upload directly to a Google Cloud Storage bucket using the Firebase SDK for web and mobile clients. Then, you can use a Storage trigger to deal with the file after it's finished uploading.

like image 76
Doug Stevenson Avatar answered Oct 25 '25 08:10

Doug Stevenson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!