How to get Image Object using Cordova?

前端 未结 2 1394
抹茶落季
抹茶落季 2020-12-18 10:43

When use use getPicture either we get a relative URL or base64image. But I want to send a image object to Amazon S3. Anyway to do that ?

Here is how I am getting the

2条回答
  •  自闭症患者
    2020-12-18 11:42

    Similarly you can also load byteStream to the image tag

          function(success) { // Assuming you are sending the bytestream from the code
    
             var img  = document.getElementById('image');
             img.src = 'data:image/png;base64,' + success.bytestream;
           }
    

提交回复
热议问题