Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6745

How to display a image in UI from image data stored in BLOB

$
0
0

Hi

 

I am using fileuploader in UI5 to upload a image into HANA. I have use the below blog as my reference.

File upload on SAP HANA XS Application

So basically i get the file content from the multipart request as follows:-

$.request.entities[0].body.asArrayBuffer(); and i store this content into a BLOB column.

 

I am however struck in the second step where-in i need to read the data from the blob column and use this data to display the image in the UI.

 

I am calling a service to get the data in BLOB column and then in the UI5 code i try to

 

var image = new sap.m.Image("image2", {

        src : "data:image/png;base64 + <blob_data>

 

});

 

The <blob_data> is return by the service wherein i am just selecting the BLOB column data.

 

I am however not able to see the image.

 

 

Trinoy


Viewing all articles
Browse latest Browse all 6745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>