I have a process that's already up and running where I have MM set to pull files from an ftp server, and attach them to a node via a CCK field. The problem I have is people want to upload zip or tar files, as they are smaller. Is there a way I can use this module to kind of inject an extra step where I unzip/untar the files, and attach the file in the cck field, but have it be the unzipped version of the file? I'm guessing I'd have to tell everyone who's uploading files that they can only zip one file at a time, but at least the files would be a smaller size. Does this make sense? Is this something I can do with this module?
Comments
Comment #1
anantagati CreditAttribution: anantagati commentedYes, you can this module.
If I am correct you can do either:
- use mm_custom_command action to extract zip file and return output filename
- use 'Save data in a CCK field' action from mm_cck module to add file to the node
or
- use mm_custom_command php action
- write you php code which will extract zip archive and attach all files to the node
Comment #2
anantagati CreditAttribution: anantagati commentedComment #3
brettev CreditAttribution: brettev commentedI'm still a little unclear what to do here. I'm setting this up as a "process", right? I have 2 fields:
Output File:
Command:
Do I put in the command:
unzip [harvest_file] [output_file]
?
It seems like this would do it, but do I have to put anything in the output file field?
Comment #4
brettev CreditAttribution: brettev commentedComment #5
anantagati CreditAttribution: anantagati commentedYes, definitely. You will most probably use something like 'file-[nid].jpg'.