cancel
Showing results for 
Search instead for 
Did you mean: 

upload file on server by MII page

former_member745782
Active Participant
0 Kudos

hello everybody,

I have a problema and i don't find any solution.

I'm working with sap MII 14 and i create a html page (with sapui5 technology) within upload a file (*.bin) into a specific directory in MII server.

I used this code:

....

<script> 
    var layout = new sap.ui.commons.layout.MatrixLayout();
    layout.setLayoutFixed(false);
    // create the uploader and disable the automatic upload
    var oFileUploader2 = new sap.ui.commons.FileUploader("myupload",{
                         name: "upload2",
                         uploadOnChange: true,
   //                    uploadUrl: "uploader.php",
  uploadUrl : "http://mymiiserver:50000/XMII/upload/",
                         uploadComplete: function (oEvent) {
    var sResponse = oEvent.getParameter("response");
    if (sResponse) {

       console.log(oEvent);
        alert(sResponse);
    }
    }});                       
    layout.createRow(oFileUploader2);
    // create a second button to trigger the upload
    var oTriggerButton = new sap.ui.commons.Button({
                         text:'Trigger Upload',
                         press:function() {
    // call the upload method
    oFileUploader2.upload();

    $("#myupload-fu_form").submit();
    alert("hi");
    }
    });
    layout.createRow(oTriggerButton);
    layout.placeAt("sample2");               
</script>

...

but don't work.

I found other task here but they use applet, and we cannot use it here.


Any suggestion or example?

thanks

Alex

Accepted Solutions (1)

Accepted Solutions (1)

swaroop_anasane
Active Contributor
0 Kudos

Hi Alessandro,

Are you getting any message in the console? Please share, it would be helpful to reach to the exactly issue yuo are facing.

Warm Regards,

Swaroop

former_member745782
Active Participant
0 Kudos

Sure,

this is message i receive back when i try to download the file (any kind of file).

Alessandro


swaroop_anasane
Active Contributor
0 Kudos

Thanks Alessandro,

Below thread would be helpful to you.

Best Regards,

Swaroop

Answers (0)