Digital Ocean Functions request larger than allowed 2097152 bytes

I am trying to use Serverless Functions and Spaces to handle multiple upload requests from browsers. It works when I upload a file size is less than 2097152 bytes, but an error message will be thrown if file size is larger than 2097152 bytes.

e.g. “Request larger than allowed: 3546372 > 2097152 bytes.”

Wanna to ask if possible to increase the file upload limit.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
November 30, 2022

Hello @justinwong

When it comes to spaces these are the current limits:

Buckets have the following file size limits:

  • PUT requests can be at most 5 GB.

  • Each part of a multi-part upload can be at most 5 GB.

  • Each part of a multi-part upload must be at least 5 MiB, except for the final part.

  • Multi-part uploads can have at most 10,000 parts.

  • The maximum supported total size of a multi-part upload is 5 TB.

This means the error should not be related to Spaces limits. Would you mind sharing details about the function itself?


Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel