Closed (won't fix)
Project:
FileField
Version:
6.x-3.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2012 at 11:08 UTC
Updated:
13 Apr 2013 at 17:26 UTC
Jump to comment: Most recent
Comments
Comment #1
ericg commentedI'm having the same problem. using filefield with an image allows for defaults to be set but file with file upload does not. Did you ever figure out this issue or a usable workaround?
Comment #2
quicksketchFileField does not have the ability to set a default file. This changed in Drupal 7, but it's unlikely that the D6 version will receive this feature.
Comment #3
raulmuroc commentedIt is for security reasons. Imagine you lead an Upload form that it get default file from DB or disk folder.
If I creaet an script which deletes part of your webpage (or corrupts it) and I just find the way to upload in the directory or DB where your files are saved with the same name than one existing (overwritting it), then will take my malicious script as a default file in your form without any kind of testing as it is supposed to have passed the optional secure methods to validate files at the form.
That's really dangerous! People would trust your website, just click on the file with consequences. No way is nice that!
Otherwise, if they have to upload through your form, you have the opportunity to scan that file with secure methods (not obligated, if you don't pass validation tests then is the same at the end, no security at all).
;)