Error Handling on Attach not working right

AlanChandler - September 15, 2004 - 21:22
Project:Drupal
Version:x.y.z
Component:upload.module
Category:bug report
Priority:normal
Assigned:dopry
Status:closed
Description

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.

#1

al - October 8, 2004 - 09:12

Do 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.

#2

AlanChandler - October 9, 2004 - 07:46

I 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.

#3

killes@www.drop.org - March 13, 2005 - 23:03

There 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.

#4

dopry - March 10, 2006 - 09:34
Assigned to:Anonymous» dopry

assigning to myself so I will remember to test later after upload patch hits core.

#5

moshe weitzman - March 10, 2006 - 19:22
Status:active» closed

everything about uploads has changed. please reopen if this is still happenning (unlikely)

 
 

Drupal is a registered trademark of Dries Buytaert.