Iam getting Crazy with JQuery Uploadify V3.1.
// setup fileuploader
$("#file_upload").uploadify({
'swf': 'flash/uploadify.swf',
'uploader' : 'upload/do-upload',
'debug' : false,
'buttonText': 'Files auswählen',
'multi': true,
'method': 'POST',
'auto': false,
'width': 250,
'queueSizeLimit' : 10,
'fileSizeLimit' : '100MB',
'cancelImg': 'img/uploadify-cancel.png',
'removeCompleted' : true,
'onUploadSuccess' : function(file, data, response) {
$('#message').append(data);
},
'onUploadError' : function() {
$('#message').html('<h2>Fehler beim Upload</h2>');
}
});
To start Download onClick
// handle the event stuff
$("#event_start_upload").on({
click: function(){
var key = $('#key').val();
if (key.length < KeyLength) {
$('#form-encryption-control').addClass('error');
return;
} else {
$('#form-encryption-control').removeClass('error');
}
// some space for new download links
$('#message').empty();
$('#file_upload').uploadify('upload','*')
}
});
My Problem is: I have to pass addtional params to the serverSide, in Uploadify V2 there was an Method uploadifySettings to pass “scriptData” , but not in V3? Someone knows how this works?
If someone else needs the clue:
'onUploadStart' : function(file) {
var key = $('#key').val();
$("#file_upload").uploadify('settings', 'formData', {'key' : key});
},
To send a data via uploadify you can use
formDataFor e.g: