on 05-20-2015 6:27 AM
Hi Everyone,
I'm working in SAP ui5 project here the odata contain image file as jpg format. I want to fetch the image and show it in the screen pls suggest some idea for it.
Content-Type:"image/jpeg";
Code:
get:function(){
var url = "proxy/http/71.170.170.211:8000/sap/opu/odata/sap/ZHR_APP_SRV/GetImagesSet('00800001.jpg')/$value";
var username = "arunk";
var password = "welcome01";
var oModel = new sap.ui.model.odata.ODataModel(url,false,"arunk","welcome01");
oModel.refreshSecurityToken();
oModel.setHeaders({
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "image/jpeg",
"DataServiceVersion": "2.0",
"X-CSRF-Token":"Fetch"
});
oModel.read('',null,null,true,function(oData, oResponse) {
});
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
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.