Attached patch (git-generated) adds the option to rename the image file according to a spec like the 'Image path' setting. Also, a more shaky feature, the spec is evaluated against node tokens (if node is available).

e.g.
specifying '[user]-[date-in-tz]' for 'Image file name' will rename complicated_and_unnecessary_filename_(22).jpg to [user]-[date-in-tz].jpg

Using this in production; UI may need a tweak.

Cheers

Comments

Farreres’s picture

Hey, could you add also support for this? http://drupal.org/node/259263

dopry’s picture

Status: Needs review » Needs work

@k8n: Strip the the node token options and this can go in... I'm generally adverse to altering user input, but there has been enough demand for this that I will entertain it.

k8n’s picture

StatusFileSize
new2.68 KB

@dopry: Done and done.

k8n’s picture

Status: Needs work » Needs review
Vuds’s picture

StatusFileSize
new2.68 KB

Hi k8n and dopry,

I've tried to use the patch but I saw that it was not working with user tokens, just the globals. Here you go it corrected.

PS: I've made another version for me yet, adding the possibility to use node tokens too (I was more thinking to use nid to identify the files) and adjusted the module to use with the paths too. It worked very well. If you think it's a good thing, I can upload this patch too.

Thanks!

whisk’s picture

I've made another version for me yet, adding the possibility to use node tokens too (I was more thinking to use nid to identify the files) and adjusted the module to use with the paths too. It worked very well. If you think it's a good thing, I can upload this patch too.

That will be quite interesting and useful, Vuds!

quicksketch’s picture

Status: Needs review » Closed (won't fix)

This won't be applied to the 5.x version, which is now maintenance only. In Drupal 6 you can use the FileField Paths module to accomplish the same thing.