Unable to upload files: “File is empty”

Out of nowhere I couldn’t upload files, getting the following message after the upload process completes:

File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini

Furthermore, I couldn’t see any of the already uploaded images in Media, although I had the right counts in the filters (images, unattached, videos and so on). I could see video and audio files in their lists, as they have predefined thumbnails, but no images.

After checking the server’s space with the shell command:

df -h

It turned out that the partition, where /tmp resides, was full. Changing the path to upload_tmp_dir (in php.ini) would do the trick, but the real solution is to free up more space and to prevent this event from happening again.

Leave a comment

Your email address will not be published. Required fields are marked *