Form a usability perspective I expect a CMS to do the work for me. Right now, on the "Permitted upload file extensions" settings, I get the description:
Separate extensions with a space and do not include the leading dot.
So I entered pdf, doc, xls, ppt, zip. No dots, so all accepted.
After uploading a file I get this error:
The selected file filename.pdf could not be uploaded. Only files with the following extensions are allowed: pdf, doc, xls, ppt, zip.
It took me a while to figure out the comma's in the allowed extentions where the cause of this error.
Suggestion:
- Filter out comma's automatically
- Or (quick win) change the message that dots AND comma's are not allowed
Comment | File | Size | Author |
---|---|---|---|
#2 | filefield_validate_extensions_commas.patch | 1.95 KB | quicksketch |
allowed_extentions.png | 3.09 KB | BarisW |
Comments
Comment #1
quicksketchThis probably won't be changed since development on FileField is winding down. The core version of FileField in Drupal 7 does allow commas.
Comment #2
quicksketchHaving some free time and a penchant to clean the FileField queue, I put together this patch which back-ports the commas-are-optional approach of Drupal 7. Essentially you can use commas if you want (they're actually inserted for you now) but either commas or spaces will have the same effect.
Comment #3
quicksketchComment #5
endiku CreditAttribution: endiku commentedSeems this was somewhat lost in the most recent dev version. I had to apply the patch again to fix.