1

I am trying to upload jpg assets to Craft. As long as the files are smaller than approx. 1MB it's working, even in bulk upload. As soon as there's a file bigger than 1MB Craft gets stuck like this:

enter image description here

You can see on the image that files smaller as the 1MB have been uploaded successfully.

The file doesn't show up in the assets directory on the server file system.

I enabled devMode to take a look at the logs but no error level log entry shows up that is related to the upload request. JS console shows no errors as well.

So my question is: What is going on? How can I fix this so I can upload files within the limits I specified in php.ini?

Some info:
I am using Laravel Forge + DO
Web server: nginx/1.11.5
PHP Ver: 7.1.0
post_max_size = 14M
upload_max_filesize = 12M

PS: I say approx. 1MB because I was able to test with files that are roughly below/above 1MB file size.

Update
I noticed Imagemagick was not installed. After installation: no difference. I even disabled GD: no difference.

  • Did you check that the settings has been applied, and did you check server logs? – Fred Carlsen Jan 23 '17 at 12:11
  • @FredCarlsen Yes the settings are showing up in Crafts PHPinfo. Which logs do you mean by server logs? – Johannes Jan 23 '17 at 12:43
  • @FredCarlsen Man I got it. You pointed me to look inside /var/log/nginx/domain-error.log. It says: client intended to send too large body – Johannes Jan 23 '17 at 12:49
  • I assume that it's returning a 500 error, so I'd make sure devMode is turned on. Then I would check phperrors.log, craft.log and any other relevant logs. – Fred Carlsen Jan 23 '17 at 12:49
  • Right, is that a limit in nginx? – Fred Carlsen Jan 23 '17 at 12:49
2

Nginx's setting client_max_body_size was set to its default value of 1M because it was not specified after provisioning the DO server with Laravel Forge. Weird thing is just that the user doesn't get any response.

Solution: Set client_max_body_size to something higher or 0 in your Nginx config file.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.