XUpload - Do some process befor copying from temp to upload folder

Message
Author
romano
Posts: 2
Joined: Aug 23, 2011 11:59 am

Do some process befor copying from temp to upload folder

#1 Postby romano » Aug 23, 2011 12:53 pm

Hi,

I want to transcode an audio file after uploading to temp folder and send it directly to amazon S3 storage. So I don't need to move the uploaded file to xupload’s target upload folder (I want to skip this process of xupload and get the feedback to my php to continue the work for transcoding and S3 storage).I need to know the place of this process.

The normal process of xupload Pro has a moving file from temp folder to final upload location which creates double coping process with transcoding of file and moving to S3 and my site has heavy traffic. I need to skip this process and do all processes in temp folder and finally remove the file from temp folder. I have good knowledge in php but in perl newbie.

Thanks,
Romano

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#2 Postby admin » Aug 23, 2011 1:03 pm

If your perl knowledge is not good enough to modify xupload code - we suggest you to leave moving as is and do transcoding and amazon s3 uploading in php script which will be called by xupload when upload is complete (there's "url_post" parameter for that).

romano
Posts: 2
Joined: Aug 23, 2011 11:59 am

#3 Postby romano » Aug 23, 2011 1:39 pm

Thanks for fast reply,

Actually as I said the reason for this work is only skipping the copy process of upload.cgi to target folder. If it is only file move it shouldn't have heavy process but if it is copy I should find a way. I need to know
does it move the file from temp folder to target or not it is only a copy?
I think It can be a good feature for next version which the developers have an optional function in the xupload to apply their server side process.

Regards,

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#4 Postby admin » Aug 23, 2011 1:49 pm

It's trying to move first. If moving failed (not enough permissions to delete) - then just copying.