Search code examples
infragisticsignite-ui

How to return data when a file is uploaded with igUpload control


I'm using upload control in the following manner:

uploadContainer.igUpload({
        mode: 'multiple',
        multipleFiles: true,
        maxSimultaneousFilesUploads: 2,
        maxUploadedFiles: 2048,
        labelUploadButton: "Choose File",
        labelAddButton: "Choose File",
        labelClearAllButton: null,
        autostartupload: true,
        onError: function(e, args) {...some function...},
        fileUploaded: function(e, args) {...some function...},
        allowedExtensions: ['dwg', 'DWG']
    });
  • Current user, when arrives on the page, could upload a file.
  • After uploading, he expects some information to be returned from uploaded file.I have to display list of layouts of the dwg file per example.
  • Into my upload handler class at the back-end, "FinishedUpload" method is called. There, I'm reading the file, extracting some information from it and I want to return this information back to the front-end.

How to accomplish that? Any ideas are welcomed!

Thank you!


Solution

  • The information to send additional data to the server Upload MVC Wrapper and the igUpload control on the client and vice-versa will be available in the Ignite UI June 2015 service release.

    What you can do currently is to handle the client-side fileUploaded event and send an additional Ajax request to the server to get the data you want.