ignite-ui
ignite-ui copied to clipboard
When igUpload has useSingleRequest: true additional parameters added to the form data are not processed correctly on the server side.
Description
When igUpload has single requests enabled and some additional parameters are added via addDataField method:
$("#upload").on("iguploadonformdatasubmit", function (evt, ui) {
$("#upload").igUpload("addDataField", ui.formData, { "name": "Parameter Name", "value": "Value" });
});
The additional parameters for the server side UploadStarting event do not populate correctly in the event args - e.AdditionalDataFields is empty.
Note: Issue seems to be with the order of the parameters added to the form data. If the additional parameters are added first and then the file it works as expected. Probably event formdatasubmit should be fired before adding the file to the form data.
- ignite-ui version: 20.1
- browser: Any
Steps to reproduce
- Run the attached sample.
- Upload a file
Note: if useSingleRequest is not set then it works as expected.
Result
Server side handler throws error because e.AdditionalDataFields is null
Expected result
e.AdditionalDataFields is populated correctly.
Attachments
@MayaKirova do you think this issue also affects the MVC assembly as well? I'm running into a similar issue using Infragistics.Web.Mvc
?
@PeteSral Yes. As the issue seems to be in the client-side code of the igUpload, which is the same regardless of the backend handler/module used it would reproduce with Infragistics.Web.Mvc.