Jump to:
| Project: | FileField |
| Version: | 6.x-3.1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | file uploads |
Issue Summary
We ran into this a while back and ended up fixing it by adding more space to the server. However, I wanted to post this so that the developers might find a way to avoid this in the future. From what we can tell, the code doesn't check the available space when uploading a file. As a result, the file information gets saved into the database, but the attached file has a size of Zero bytes when the hard-drive does not have the capacity for the uploaded file. Is there some way of implementing a warning to let the user know that there is a problem with hard-drive space? As it was, we had over 80 files uploaded, with associated records in the database, that contained no data. We didn't know that there was a problem until people started complaining that the files were empty. We ended up moving everything to a larger server and that seems to have fixed the problem, but it would be nice if there were some notification. We ran out of space because we were running backups to frequently and didn't have enough hard-drive space to handle it.
Thanks for your help.
Comments
#1
FileField doesn't seem like the right place to be reporting such errors. Giving your end-users errors that are intended for your system administrator isn't a good practice. Generally tools for monitoring the memory, CPU, and disk usage of your server are provided by other systems, not the software actually running the website. Additionally, it may be difficult for FileField to even properly recognize such a problem. I don't think your situation of having 0-byte files is universal, on a lot of systems the upload would just fail entirely. Things get even more confusing with shared-hosts that have "soft-limits" where the files are allowed to be uploaded but then truncated, or the actual hard-disk has plenty of room but it's some Apache extension that's causing the limit.
#2