Based on the current uploadify documents, it uses formData (weird all google search results, ppl are using scriptData). The problem is I tried to manually change the formData using setting and onUploadStart event as this uploadify docs said. However the folder always stay the same (/webroot/newsletter) when it reaches the server. It should be (/webroot/newsletter/update), I am testing this way, as the value should be dynamic later on. Any clue what went wrong here? There is another question in the uploadify forum too but no answer so far
$('#file_upload').uploadify({
'method':'POST',
'formData' : { 'currentDirPath' : '/webroot/newsletter' } ,
'swf' : '/js/uploadify-v3.1/uploadify.swf',
'uploader' : '/js/uploadify-v3.1/uploadify.php',
'checkExisting' : '/js/uploadify-v3.1/check-exists.php',
'onUploadStart' : function(file) {
$("#file_upload").uploadify('settings', 'currentDirPath', "/webroot/newsletter/update");
} ,
'onUploadSuccess' : function(file, data, response) {
alert('The file was saved to: ' + data);
}
// Put your options here
});
The documentation is wrong. It should be:
$("#file_upload").uploadify('settings','formData' ,{'currentDirPath': /webroot/newsletter/update});
Just in case if someone stumble on this problem. Cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With