Closed (fixed)
Project:
Media Mover Custom Command
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2009 at 20:57 UTC
Updated:
20 Aug 2009 at 21:28 UTC
I don't really understand how this module works. Maybe someone can give me some help? All I want it to do is rename the uploaded file to include the user's id number at the beginning of the file name.
example: video.flv renamed to 1_video.flv
after this, it is to be uploaded to an FTP server.
I've got it working to where it will upload the video to the FTP server no problem, but I can't figure out how to rename it. any help would be appreciated.
Comments
Comment #1
anantagati commentedYou should fill into 'Output file' something like this:
[user-id]_[harvest_file].Instead of [harvest_file] you may use other states of file depending on in which action is Custom Command used.
And in 'Command' you can copy original file by this code:
cp [harvest_file] [user-id]_[harvest_file]Comment #2
robotsguide commentedI tried this and it didn't work. it also made it so it didn't transfer to the FTP server.
Comment #3
anantagati commentedCan you send me info about your configuration?
Comment #4
robotsguide commentedwhat do I need to send?
Comment #5
anantagati commentedYou go to 'admin/build/media_mover/export' and export Media Mover configuration.
Comment #6
robotsguide commentedhere's what you asked for:
thanks for your support!
Comment #7
anantagati commentedOk, I looked on it more deeply and it seems that there is need to have some more tokens which will return just filepath, name or extension of file. [harvest_file] also contains path to the file (ex. sites/default/files/gallery/videos/gauranga.mov) so it is hard to use for this case.
I created issue #548062: [mm_token] More flexible tokens for working with files for media_mover/mm_token module.
Comment #8
robotsguide commentedThank you!
Comment #9
robotsguide commentedI figured this out using Filefield Paths. There are tokens available within that module to do exactly what I needed. Closing issue.