0
votes

I am send a POST Request from some javascript with XMHTTPRequest to a python script, the python script then saves the image file that was sent in the post at base64 TEXT. When I do this I am getting the error

POST http://example.com/save_info.py 413 (Request Entity Too Large)

However I tried sending the same thing to my friends server which we can call friend.com and it worked no issues. So I know its not the python.

And I also retrieve the saved file with a python script on example.com, and then display in HTML, this time I directly input the file that is about 1.5MB that I was trying to save earlier into mySQL and then retired it and I got no errors.

So I am wondering why I am getting this error when sending the image file but not when getting it back the the database. And how can I solve this error so I can save the file?

Thanks for the help

1

1 Answers

0
votes

Hello if you would use NGINX you would need to set in your nginx configuration file

client_max_body_size 2M;

Thus increase your limits for the file you're uploading.

But as long you are using shared hosting Dreamhost. You may need to get in touch with customer help.

However I have found that many people have been experiencing similar issue as you but with PHP, so they been customizing settings for php.ini if I am not mistaken.