is there a way to automatically prepend the username of the uploader along with an underscore?

example:

user "drupalguy" uploads "video.flv"

video uploads as "drupalguy_video.flv"

Comments

nevets’s picture

You can get close, configure the field and look under path settings. You could set path settings to [user] which using your example would give you drupalguy/video.flv (the result is each users video's end in their own directory.

robotsguide’s picture

that would almost work, except that after it's uploaded, media mover FTPs it from my server to a Content delivery network. I need a way to differentiate the videos by user there.

pbuyle’s picture

I user FileField Path so I don't know if it is one its features or a FileField one, but in the field settings I can set the filename using tokens. I guess using [user]_[filefield-onlyname-original].[filefield-extension-original] as filename would do what you are looking for.

robotsguide’s picture

Mongolito404,

You are amazing! This worked perfectly for me! here's the token I used if anyone is interested:

[author-name]_[filefield-onlyname-original].[filefield-extension-original]

pbuyle’s picture

Status: Active » Fixed
pbuyle’s picture

Status: Fixed » Closed (fixed)