Recently I've noticed that file uploads through the Craft admin panel have started to fail with the response "Error uploading the file: Uploaded file was empty". This error occurs when trying to upload a file to the server or to S3.

At first, I was able to get around the issue by switching to a different browser or clearing the current browsers history and cookies. For some reason that would consistently alleviate the issue for any user who tried it, but as of last week this no longer appears to work.

So far I have tried:

  • Checking file permissions for the asset folder, they're set to 777
  • Increasing the php memory_limit, post_max_size, and upload_max_filesize
  • Uploading different file types and sizes looking for specific type or size that works, even a 20kb jpg fails.

Has anyone seen this before or have an idea where to look to fix the issue?

1 Answer 1


You'll get that message whenever Craft/PHP can't upload the file (for any number of reasons).

Looks like you've covered permissions and some common php.ini environmental limitations.

If it's happening of every file regardless of file type or size, you can probably rule out any GD or Imagick related bug.

Other things to check for:

  1. You're out of disk space on your hosting account.

  2. You're out of allocated space for the /tmp folder on your account.

  3. There is some firewall / .htaccess rewrite rule / Suhosin / mod_security blocking the request.

It's probably worth checking craft/storage/runtime/logs for any errors as well as your web server's error logs.

  • Thanks Brad! We were indeed out of disk space. After finding what was causing that and removing it we were able to upload assets again. Commented Jan 19, 2017 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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