Is there some way how to set status to media mover files from external server?
I want to do this:
- drupal server: user upload file to the node with CCK filefield
- drupal server: mediamover harvest file from field
- drupal server: mediamover will send it do Amazon S3
- external server: script will download file from S3 uploaded in previous step
- external server: processing of the file
- external server: processed file is uploaded to S3
- external server: send info to drupal server: media mover where is file and set status to completed
- drupal server: mediamover file data will look like this:
Harvest: mm_content Harvest: 1 Harvest: files/test_1.txt
Process: media_mover_api Process: 1 Process: files/test_1.txt
Storage: mm_s3 Storage: 2 Storage: http: //s3.amazonaws.com/original-backet-name/node-68.txt
Complete: mm_external Complete: 2 Complete: http: //s3.amazonaws.com/finished-backet-name/node-68.txt
Does already exists module which allows to change status of media mover files from external server?
If not what is best way to do it? I am thinking about module for complete action using services.module to get and send info to the media mover.
Comments
Comment #1
anantagati commentedComment #2
arthurf commentedIntersting- I hadn't thought of moving the original file to s3. It should be fairly trivial to modify the s3 module to do this- or have the option to do this. I also hadn't really considered what happens if you run the s3 processes back to back. I think that is going to pose problems for the file path that the subsequent media mover actions are going to try to run. I think that it means that $file['storage_file'] will still have to be the file on the server, and the s3 module will have to add it's data into $file['data'].
As per changing the status of a file from an external server, I haven't written anything to do this, but it could be archived with XMLRPC or by calling specific urls which can be protected from abuse.