Skip to Content
0

How to call success and failure function for Fileupload to find status of upload

Jan 24, 2017 at 07:51 AM

32

avatar image

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");

}

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers