Drupal 7: Rename files on upload (via filefield)

Posted by Eugene on Stack Overflow See other posts from Stack Overflow or by Eugene
Published on 2012-12-16T17:01:37Z Indexed on 2012/12/16 17:03 UTC
Read the original article Hit count: 133

Looking for a way to rename files that are uploaded by users through a filefield. For example, rename user profile photos using uniqid.

I found a good solution for D6 here:

http://www.wesjones.net/home/2011/03/drupal-6-how-to-change-filename-on-upload

but can't find anything for D7.

Another option is to use File (Field) Paths, but (1) the module causes warnings on my setup and (2) seems to be a bit of an overkill to install a general module for a very specific purpose.

© Stack Overflow or respective owner

Related posts about file-upload

Related posts about drupal-7