Devarsh Patel
Devarsh Patel

Reputation: 71

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

Upvotes: 4

Views: 1829

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317372

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.

Upvotes: 2

Related Questions