01-24-2017 7:51 AM - edited 02-03-2024 5:25 PM
I have written this code to upload a file
var oFileUploader = sap.ui.getCore().byId("id_fileUploader");
var File_name = oFileUploader.getValue();
oFileUploader.destroyHeaderParameters(); oModel.refreshSecurityToken(); oFileUploader .addHeaderParameter(new sap.ui.unified.FileUploaderParameter( { name : "x-csrf-token", value : oModel.getSecurityToken() })); oFileUploader .addHeaderParameter(new sap.ui.unified.FileUploaderParameter( { name : "slug", value : File_name, })); oFileUploader.upload();
fnSuccess()
{
sap.m.MessageToast.show("Success");
}
fnFail()
{
sap.m.MessageToast.show("Fail");
}
Found the answer file upload has success and abort properties.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.