Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When the list of Permitted upload file extensions: is changed to allow bmp, or tiff, the module throws an error, and oddly adds additional commas between all of the existing file extensions.
To reproduce:
1) configure an image field
2) attempt to add tiff to the list
3) note error, then note list (now says png,, gif,, jpg,, jpeg,, tiff)
4) delete tiff, replace with bmp, try to save again
5) note error, the note list (now says png,,, gif,,, jpg,,, jpeg,,, bmp)
Comment | File | Size | Author |
---|---|---|---|
#2 | filefield_extension_check_fix.patch | 1.22 KB | quicksketch |
Comments
Comment #1
quicksketchThanks, moving this over to FileField, since it's responsible for the extension list field.
Comment #2
quicksketchI've committed this fix which prevents the extra commas from showing up. It also allows preceding dots before file extensions but automatically strips those out upon saving. This should help a lot and follow the practice of "accept values loosely, store them consistently".