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).

Files: 
CommentFileSizeAuthor
insert.module.patch1.27 KBHonoredMule

Comments

Status:Patch (to be ported)» Needs work

Hi, 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 makes it so, using a configurable option that defaults to on (use original filenames).

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.