Git Product home page Git Product logo

Comments (9)

tejaskutal avatar tejaskutal commented on August 15, 2024 1

You don't need the Base64 plugin then, you can simply change the below line from:
destinationType: this.camera.DestinationType.FILE_URI,
to:
destinationType: this.camera.DestinationType.DATA_URL,

This will give you the Base64 of the selected/clicked image directly.

from phonegap-base64.

tejaskutal avatar tejaskutal commented on August 15, 2024

Are you fetching the image through Camera/Gallery ?

from phonegap-base64.

busrauman avatar busrauman commented on August 15, 2024

I'm fetching from camera and gallery with FILE_URI
like that,
this.camera.getPicture({
quality: 100,
destinationType: this.camera.DestinationType.FILE_URI,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
encodingType: this.camera.EncodingType.JPEG,
correctOrientation:true
}).then(imageData => {
console.log(imageData)
}, error => {
// this.error = JSON.stringify(error);
console.log(error);
});

from phonegap-base64.

busrauman avatar busrauman commented on August 15, 2024

yes i know, but i dont want to show image only , i need to upload remote server so i need file_uri
i am using now normalizeUrl(path) to show selected image it works now, but i want to know why it doesnt work

from phonegap-base64.

tejaskutal avatar tejaskutal commented on August 15, 2024

Coz it's been in 'beta' stage since like forever :/

from phonegap-base64.

busrauman avatar busrauman commented on August 15, 2024

thank you for your advice and time :)

from phonegap-base64.

tejaskutal avatar tejaskutal commented on August 15, 2024

Anytime. In case you find a solution to get base64 from the image URI, please post it here. I need it too :)

from phonegap-base64.

busrauman avatar busrauman commented on August 15, 2024

Ofcourse, if i find anything i will share here:)

from phonegap-base64.

austinhutchison avatar austinhutchison commented on August 15, 2024

It's working for me, but I'm using the cordova-camera-plugin-with-exif plugin.

I use
.getPicture({destinationType,1}).then(imageData...,

then normalizeURL(imageData['filename'])

then this.base64.encodeFile(normalizedPath)

from phonegap-base64.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.