1

I know there are other question like this around, but the solutions are not working for me. Can someone help me figure out how pass parameters using a POST request with the jquery-file-upload library, specifically when the send option is being used:

$('#fileupload').fileupload('send', {files: [file]} )
.success(function (result, textStatus, jqXHR) {
    console.log("Success...");
});  

I've tried the following:

$('#fileupload').fileupload('send', {
    files: [file], 
    formData: {'fileType': fileType}
})

and also:

$('#fileupload').fileupload({formData: {'fileType': fileType} });
$('#fileupload').fileupload('send', {files: [file]})

and I've tried putting formData in the format of formData: [{name:'fileType', value:fileType}]

1 Answer 1

1

I had same problem a few minutes ago. You should use :

file_upload.fileupload('send', {files:filesList, paramName: paramNames});

I found it here: Uploading multiple files asynchronously by blueimp jquery-fileupload

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, that looks useful, but it still doesn't work for me. paramNames seems to be just an array containing the param names, what about the values?
I don't have anything better than How-to-submit-additional-form-data. paramNames helped me with wrong field names when multiple files are send in single request.
I've read through it already and unfortunately it didn't help me. Thanks anyway

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.