IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics

Home Page:https://bit.ly/2kuu1fT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When igUpload has useSingleRequest: true additional parameters added to the form data are not processed correctly on the server side.

MayaKirova opened this issue · comments

commented

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

  1. Run the attached sample.
  2. 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

UploadSample.zip

@MayaKirova do you think this issue also affects the MVC assembly as well? I'm running into a similar issue using Infragistics.Web.Mvc?

commented

@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.