1

I've noticed that it is a common functionality within public sites to change the name of uploaded pictures to a long, 'random', alphanumeric string. This is good for privacy etc.

I can't find a module within Drupal that achieves this, and was wondering if it was possible. This would need to operate before modules like ImageCache.

???

james6848
  • 1,657
  • 3
  • 25
  • 39
  • 1
    Here is a code which renames the file name druing upload: http://stackoverflow.com/questions/13903458/drupal-7-rename-files-on-upload-via-filefield – Druvision Nov 02 '13 at 21:40

1 Answers1

2

I think there're no modules that does exactly what you're looking for, but i can suggest a way to achieve this using code. There's a module called filefield_paths which makes you able to change the name of imagefield files with a token, provided by the token module. Looking into the code of this module you can see how it works and make your own small module to achieve the same result with an alphanumeric string.

In detail, the function you're looking for is here, at line 457. I can't provide a directly working solution as I need time to write and test the code, however this is a very good starting point.

Ingo86
  • 172
  • 6