Skip to Content
avatar image
Former Member

FileUploader, how to add Parameters?

Hi experts,

I'm trying to import an excel file into a table using the FileUploader control.

For that i need to send the table content to the backend together with the file.

I saw there is a property parameters[] in this control, but i don't really get it how to use it.

In the "change" event from the control, I'm trying to add some parameters, but it doesn't accept them with fileUploader.addParameter("someContent")

What kind of values does this method accept?

and what is the best way to send some data to the backend through the fileUploader control?

Regards,

Georgi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 23, 2015 at 03:58 PM

    The problem was that we are using an older version of the sapUi5 library.

    The sap.ui.unified.FileUploaderParameter is since version 1.21.0. and with versions below we need to use the sap.ui.commons.FileUploaderParameter

    Thanks for the help!

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2015 at 01:54 PM

    I don't have used the fileuploader yet.

    But have you already read the API about that control?

    SAPUI5 API

    addParameter

    Parameters:

    {sap.ui.unified.FileUploaderParameter} oParameter

    - the parameter to add; if empty, nothing is inserted

    So you have to give him a sap.ui.unified.FileUploaderParameter ...

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2015 at 01:58 PM

    If you use the search function here, you will find a blog called "Upload Image to SAP Gateway and ...".

    There you can read about how to upload a file.

    Add comment
    10|10000 characters needed characters exceeded