Hi Azadi,
Code looks excellent, however ive got one - probably tiny problem for you :), harder for me! lol....
The upload doesnt complete because the value "1" needs to returned on success. Eg, the PHP scripts last action is Echo "1", and in my original upload.cfm i just put 1 at the end of the file and it worked.
Ive tried sticking 1 into you code in diff places but to no avail :(
Many thanks for the excellent help so far :)
J
Main Topics
Browse All Topics





by: azadisaryevPosted on 2009-09-28 at 23:28:20ID: 25446458
uploadify's built-in onComplete() function accepts, among other things, the return from your upload script (upload.cfm). you can call your own custom function in onComplete method to do whatever you want with data returned from upload.cfm, i.e. append the uploaded file name to a hidden form field.
see attached code for sample.
you can significantly expand my example code to include returning other data from upload.cfm script (e.g. an array of errors, if any) which you can then use in various ways in uploadify (e.g. display upload error messages, keep/delete files in/from the queue depending on upload success/failure, create a custom file extension checker instead of using uploadify's one, prevent uploadify from automatically removing uploaded files from queue and allow user to remove uploaded files if necessary, etc etc etc).
Azadi
Select allOpen in new window