title: Drupal 7: Rename files on upload (via filefield)
body: <p>I am looking for a way to rename files that are uploaded by users through a filefield. For example, rename user profile photos using <code>uniqid</code>.</p>
  
  <p>I found a good solution for D6 at "<a href="http://www.wesjones.net/home/2011/03/drupal-6-how-to-change-filename-on-upload" rel="nofollow">Drupal 6: How to Change Filename on Upload</a>" but can't find anything for D7.</p>
  
  <p>Another option is to use <a href="http://drupal.org/project/filefield_paths" rel="nofollow" title="File &#40;Field&#41; Paths">File (Field) Paths</a>, but:</p>
  
  <ol>
  <li>The module causes warnings on my setup.</li>
  <li>Seems to be a bit of an overkill to install a general module for a very specific purpose.</li>
  </ol>