While uploading a video file to Amazon S3, the file hits 100% in uploading, then i get the response 413 Request Entity Too Large. How do i fix this so that i can upload video files to Amazon S3?
Im using Nodejs, Express, Heroku, Cloudflare and Amazon S3.
What is your webserver nginx,apache ..etc ?
For nginx, you need to find the nginx.conf file.It should be in the
open up with vi or nano
find the client_max_body_size 2M
you can edit this end done. M = Megabyte G = Gigabyte
if that doesnt work you need to change php.ini for that to work
This sets the maximum amount of memory in bytes that a script is allowed to allocate
The maximum size of an uploaded file.
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize
UPDATED FOR HEROKU
if you are using Express v4+ you can use
app.use(bodyParser({limit: '5mb'}));
but make sure this line is above
app.use(bodyParser.json());
otherwise it will not work