Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49247

Save data string image to gallery in cordova app

$
0
0

@vishnurevolve wrote:

Hi Guys..
I just try to save the data string(data:image/png;base64) formated.But i get an error says "Error while saving image" .This the callback error from window.imageSaver.saveBase64Image();
here is the my code

var params = {data: base64Data, prefix: 'coupon_', format: 'JPG', quality: 80, mediaScanner: true};
         window.imageSaver.saveBase64Image(params,
            function (filePath) {
              console.log('File saved on ' + filePath);
            },
            function (msg) {
              console.error(msg);
            }
          );

Im also tried this too.But shows the same error "Error while saving image"

cordova.base64ToGallery(
        base64Data,

        {
            prefix: 'img_',
            mediaScanner: true
        },

        function(path) {
            console.log(path);
        },

        function(err) {
            console.error(err);
        }
    );

What does this error means? Anybody can help me?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49247

Trending Articles



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