Quantcast
Channel: SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 789

Upload file from SD Card / Camera to phone/Tablet Screen using SAP UI5

$
0
0

Hi,

 

Here we discuss about DMS initial steps concepts.

 

Intro:

A document management system (DMS) is a system (based on computer programs in the case of the management of digital documents) used to track and store documents. It is usually also capable of keeping track of the different versions modified by different users (history tracking).


From SAPUI5:


1. How to get my image/Doc from Camera or SD Card?


Code for getting image from Camera:


function capturePhoto(idImage) {

      // Take picture using device camera and retrieve image as base64-encoded string

      var id = idImage;

      navigator.camera.getPicture(function (imageData) {

          // Uncomment to view the base64 encoded image data

          var smallImage = document.getElementById(id);

          smallImage.style.display = 'block';

          smallImage.src = imageData;

    

             jQuery.sap.require("sap.m.MessageToast");

  var msg = 'Image added Successfully!!!';

      sap.m.MessageToast.show(msg);

         // localStorage.setItem('img',smallImage.src);

        var path = movePicturetoSDCard(imageData);

         

        }, onFail, { quality: 50 });

    }

 

 

 

Code for getting image from SD Card:


function getPhoto(source,idImage) {

      // Retrieve image file location from specified source

      navigator.camera.getPicture( function (imageData) {

          // Uncomment to view the base64 encoded image data

          var smallImage = document.getElementById(idImage);

          smallImage.style.display = 'block';

          smallImage.src = imageData;

         

         

          jQuery.sap.require("sap.m.MessageToast");

  var msg = 'Image added Successfully!!!';

      sap.m.MessageToast.show(msg);

         // localStorage.setItem('img',smallImage.src);

          var srcAlert = smallImage.src;

          //movePicturetoSDCard(imageData);

        }, onFail, { quality: 50,

           destinationType: destinationType.FILE_URI,

           sourceType: source });

    }

 

 

if you have any doubt while upload your image to your mobile/tablet screen. don't hesitate to ask your questions

 

From SAP Gateway Side:

 

refer: DMS Application Server file Upload

 

 

Cheers

Karthik A



 


Viewing all articles
Browse latest Browse all 789

Trending Articles



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