Payload too large 413 error

I am trying out HTTP endpoints in anvil. I am able to upload a 6MB file. But if I try to upload a 15 MB file, it gives me a 413 Payload too large error.

Is this a server limit? What is the recommended way of uploading large files?

I don’t know if you need an HTTP endpoint or are just experimenting with one. If you have a regular Anvil app that can upload the files, then this post deals with uploading large files: Timeout on large file upload

1 Like

Thanks. The links are very helpful.

I am writing an app where users will programmatically upload files to the app, e.g. using a cron job. As I cannot expect them all to be running python on the source side, I have to provide a REST API - hence the HTTP end point that they can call from any platform.

Again, poor understanding of requests on my part ref. With correct code, I am able to upload a 15 MB file in less than 5 secs, which more than serves my purpose.

3 Likes