on 06-20-2022 6:22 PM
Hi all,
The past week SAP upgraded the Fiori Launchpad Sites in Neo with Maintenance version 1.103. Now my apps are failing specifically with FileUploader Component.
The Script is easy
var fU = this.getView().byId("idfileUploader");
var domRef = fU.getFocusDomRef();
The response of domRef is version 1.103 is <Button.....
The response of domRef version 1.102 is <Input.....
We need the input, how does it work in the new version, since the demokit is still in 1.102.
var file = domRef.files[0]; //Input
var reader = new FileReader();
reader.onload = function (evt) {...}
reader.readAsBinaryString(file);
regards,
César
Hello binpath82.
I was facing the same issue in my application.
I have resolved it by adding the change event instead reading from domRef() at upload button press.
XML View:
<u:FileUploader id="fileUploader" change="onFileChange"/>
JS Controller:
onFileChange: function(oEvent){
var file = oEvent.getParameters("files").files[0];
}
Regards,
Jaffar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The visibility of the API "getFocusDomRef" is protected, i.e. it's not allowed to be called directly in application code. That API is rather intended to be overwritten in control development if needed.
But why do you need to access the internal input element? FileUploader samples for 1.103.0 are here: https://ui5.sap.com/1.103.0/#/entity/sap.ui.unified.FileUploader
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.