Our editors submit stories and attach an audio file with it. Their filename could be anything. What I want to do is change the filename to be unique and follow a strict naming convention, so that I can do various things with the file once it's on the server.

I tried using the presave $op in nodeapi to change the filename and filepath, but that didn't work. Is there a way to do this?

tl;dr:

If a user uploads a file named blahblahblah.mp3, I want to store it on the server as thisisthetitle_123.mp3. Is this possible? Much thanks!

Comments

jaxxed’s picture

Check the filefield paths module:

http://drupal.org/project/filefield_paths

jaxxed’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.