Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
upload.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Nov 2005 at 21:20 UTC
Updated:
23 Jan 2006 at 11:21 UTC
Jump to comment: Most recent file
The recent change in the validattion of node input broke uploading of files. It seems to me that introducing case 'execute' before case 'validate' in upload_nodeapi is at least a partial fix.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | upload_8.patch | 628 bytes | killes@www.drop.org |
Comments
Comment #1
killes@www.drop.org commentedhere's a patch.
Comment #2
eaton commentedWorks here, too. I'm pretty sure a nice validation/execution/insertion refactoring needs to happen at some point, but this fixes the basic 'can't upload stuff' issue.
+1
Comment #3
Tobias Maier commentedwhere's a patch?
cant see one...
Comment #4
killes@www.drop.org commentedHmm, were did the patch go?
Comment #5
dries commentedEaton?
Comment #6
eaton commentedHow bizarre. I saw the first version he uploaded, too. http://drupal.org/files/issues/upload_8.patch works though.
Comment #7
Souvent22 commentedPatched, and upload, list, delete, reupload, it all works now. +1
Comment #8
m3avrck commentedOk at least files can be uploaded now ... still other bugs to fix that are related :-D
Comment #9
dries commentedI'm wondering if we can't fix this properly. The current solution is somewhat hairy and doesn't make for good example code. Would it be a lot of work, or does someone has the time to look into this?
Comment #10
killes@www.drop.org commentedI did not really intend this patch to go into core, it is merely a workaround. The proper solution is to rewrite the validation part, I think. unfortunately i don't have the time to look at it. :(
Comment #11
m3avrck commentedDries I was looking at the code too but I'm not sure exactly what would need to change. Reason being, when you 'validate' the upload on say a node preview, upload needs to actually upload the file to make sure space requirements are met, valid extension, etc... then on execute, it almost needs to verify all of this again, just to make sure the file wasn't maliciously changed or anything. With that, I don't see this as being too hairy of a solution. However, perhaps some of the code could be broken up? I'm not exactly sure what can and can't though...
Comment #12
m3avrck commentedSee this patch for an update to this one: http://drupal.org/node/39358
Comment #13
Steve Dondley commentedUploads working now. Likely fixed per patch mentioned in comment immediately above.
Comment #14
dries commented