Add image from DB BLOB to the application Follow
If you want to add image on your mobile application from a BLOB, you should do the following:
1. ServiceManager - Create a DB service (DB_service_name
) that returns the image, and mark it in Service -> Advanced Details -> BLOB output
2. Application, Page:Field - Add Field of type 'Image', and add path or link to default image. set any logic name to the field (image_Name)
.
3. Application Page:Actions - create an action you choose (onLoad, onButtonClick, onKeyPress or other), and in that action you would call the DB service to return the image, and set the image data.
You would like to use the following code:
var myImage = $("#image_Name");
Services.call("DB_service_name", function(){
var objectURL = URL.createObjectURL(Storage.get("blob"));
myImage.src = objectURL;
});
Comments
0 comments
Please sign in to leave a comment.