Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
upload.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Sep 2004 at 21:22 UTC
Updated:
10 Mar 2006 at 19:22 UTC
I had a problem where the size of my upload was too large. (This is because the max upload size field in the drupal settings is irrelevent if the php.ini post_max_size variable also limits what can be uploaded and it is smaller).
When I hit the attach button, the resultant error throws away the content that is currently being produced - as well as failing the upload - rather than reporting an error with attaching the file.
This is very annoying when creating a long page to explain what the upload is.
Comments
Comment #1
al commentedDo things work properly if you specify a file size that is less than the maximum allowed in php.ini?
If so, this bug needs to be changed to:
Max upload size in the settings for upload.module should be enforced to be less than or equal to that in php.ini.
Comment #2
AlanChandler commentedI think you misunderstand. I am not reporting the error that upload doesn't pre-validate filesize against php.ini. From what I can see, upload relies on the internal php validation of this (I think - I tried to look at the code to find out what was wrong, but didn't get to understand it). What is happening is that the upload process fails (for whatever reason), and upload detects the error. But instead of putting an error message at the file attach point in the node (ie in the same way as other errors are marked) and leaving the user to correctly edit the node, it just forgets all about node creation and dumps the user back at a higher level, with all the rest of the node editing lost.
Comment #3
killes@www.drop.org commentedThere exists a similar error in CVS: If you add a new file to an old node (which already has a file) and that new file produces an error, the old file will be lost from the form.
Comment #4
dopry commentedassigning to myself so I will remember to test later after upload patch hits core.
Comment #5
moshe weitzman commentedeverything about uploads has changed. please reopen if this is still happenning (unlikely)