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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.