javascript - Uploadify v3.1 passing POST Data -


iam getting crazy 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 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');         }         // space new download links         $('#message').empty();         $('#file_upload').uploadify('upload','*')     } }); 

my problem is: have pass addtional params serverside, in uploadify v2 there method uploadifysettings pass "scriptdata" , not in v3? knows how works?

if else needs clue:

'onuploadstart' : function(file) {             var key = $('#key').val();             $("#file_upload").uploadify('settings', 'formdata', {'key' : key});         }, 

to send data via uploadify can use formdata e.g:

$(function() { $("#file_upload").uploadify({     'formdata'      : {'somekey' : 'somevalue', 'someotherkey' : 1},     'swf'           : '/uploadify/uploadify.swf',     'uploader'      : '/uploadify/uploadify.php',     'onuploadstart' : function(file) {         $("#file_upload").uploadify("settings", "someotherkey", 2);     } }); }); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -