I would like the insert module to create links that use the uploaded file's original filename as link text (rather than pathauto-cleansed url-friendly title that gets created.
This currently happens by serendipity if inserting a file that was just uploaded before saving the node, but this is more a bug with other components than a feature. Links created in that fashion are just acting before the filename gets changed, and I'm dealing with other bugs in filefield_path which prevent the underlying url from even working anyway (it doesn't get updated when using relative links, meaning I must re-insert the ugly version anyway or hand-edit the original insert).
The attached patch makes it so, using a configurable option that defaults to on (use original filenames).
Comment | File | Size | Author |
---|---|---|---|
insert.module.patch | 1.27 KB | HonoredMule |
Comments
Comment #1
quicksketchHi, thanks for the patch and suggestion. I'm not sure how I feel about adding this configuration option, it seems like it may be superflous to most users.
The attached patch does add a new variable, but the settings form when editing a field does not set global variables, it's per-field. So right now the settings form doesn't actually make any difference and the default value of the variable is always used.
Comment #2
Snater CreditAttribution: Snater commentedBrowsing through old tickets while working on the module's D8 version, I am closing this ticket due to its age and because I do not really get that proposed change as well. In addition to quicksketch's comment, I wonder where
$item['origname']
is set. Probably, that originates from a separate module, but that would be not a proper interface.