Skip to Content
0
Former Member
Dec 29, 2015 at 08:11 AM

sap.ui.unified.FileUploader not working in IE & Firefox

26 Views

Hi, I have weird problem with the unified FileUploader in IE and Firefox. The control is displayed but the change method is never invoked. For some reason it works only in Chrome. Below is the code and description of how I am adding the control to my form.

// I create the file uploader control and add it to a form element. This code is inside a method of my view controller. The form and FormContainer "changeContract-uploadForm" are created in the View's createContent method. The method for adding the fileuploader is called before the user enters the view (before the slide method).

var oUploader = new sap.ui.unified.FileUploader("changeContract-Upload", {

uploadOnChange: false,
buttonText: "Choose file",
change: sap.ui.getCore().byId("oMyView").getController().upload,
multiple: false
});
var protoUpload = new sap.ui.layout.form.FormElement({

fields: [

oUploader

]

});

// Add the FormElement
sap.ui.getCore().byId("changeContract-uploadForm").addFormElement(protoUpload);

//What happens in the View's createContent method:

var oForm = new sap.ui.layout.form.Form("yldeelvaade-vorm", {

layout: new sap.ui.layout.form.ResponsiveGridLayout({

columnsL: 1,
columnsM: 1
}),

new sap.ui.layout.form.FormContainer("changeContract-uploadForm", {

expandable: false,
title: "Lisa uus manus",
visible: "{oUIProperties>/uploadFrom/visible}"
}),
new sap.ui.layout.form.FormContainer("filetableContainer-cc", {

expandable: false,
title: "Manused",
visible: "{oUIProperties>/attachmentComment/container}"
})

]

}).setModel(oModelController.getFieldsLabelsModel(), "oFieldNames");

oForm.placeAt("myPage");
return oPage;

So basically I create the form and the containers and place the form at my page before hand, and later when I redirect the user to the form I add the file uploader controller. Chrome works perfectly, but Firefox and IE have difficulties understanding me.

Hopefully someone can enlighten me with explanations of this behavior.