on 2015 Sep 25 10:03 AM
Hi experts.......
I am new for this sapui5 .......
Actually i am doing one image uploading by using odata . I converted the image and keeping ready but how to post that image to back end i dont know if u guys know this plz help me............
This is my coding..
var oModel = this.oView.getModel(); |
var button = this.getView().byId("upload"); | |
var upload = this.getView().byId("fileUploader"); | |
var oDialog = new sap.m.Dialog ({contentWidth:"70px"}); | |
// oDialog.open(); |
var file = jQuery.sap.domById(upload.getId() + "-fu").files[0];
if(file===undefined)return;
var BASE64_MARKER = 'data:' + file.type + ';base64,'; |
var filename = file.name;
var reader = new FileReader();
// On load set file contents to text view
reader.onload = (function(theFile) {
return function(evt) {
oModel.oData.personal[0].base64 = evt.target.result.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
oModel.oData.personal[0].base64Index = evt.target.result.substring(oModel.oData.personal[0].base64Index);
Thank you
Regards..
Damian.a
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.