I’m currently working on an app that allows users to upload videos.

I’m using Valet for the dev environment, Dropzone.js to handle the upload to the server, Laravel for the backend, and S3 for storage.

When I tried to upload a larger video file (~300mb) I ran into this error:

413 Request Entity Too Large

By default - at least according to my config files - nginx sets the maximum file upload size to 128mb.

I was able to fix the issue by going to the below files and changing the client_max_body_size variable.

(I’m on a Mac, so the paths might be different for your system)

/usr/local/etc/nginx/valet/valet.conf /usr/local/etc/nginx/nginx.conf

Then I ran valet restart and the file upload worked. Well, I ran into a php error about the file being too large, but I already knew how to fix that issue.