Comments (9)
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.
Are you fetching the image through Camera/Gallery ?
from phonegap-base64.
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.
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.
Coz it's been in 'beta' stage since like forever :/
from phonegap-base64.
thank you for your advice and time :)
from phonegap-base64.
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.
Ofcourse, if i find anything i will share here:)
from phonegap-base64.
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)
- Issue on IOs
- for Cordova 8.0,0, it does not install HOT 1
- SecurityError: The operation is insecure HOT 1
- I am not receiving the base64 HOT 5
- unable to install the plugin
- Image more than 3MB is not converted...
- Base64 Code Is not Properly Encoded HOT 4
- Plugin not working in ios HOT 6
- Audio file not convert properly in base64 HOT 1
- Plugin not working in ios HOT 4
- Image resolution becomes very low
- configure encoding type? HOT 2
- plugin not working on ios
- Paths that contain spaces cause conversion problems. HOT 2
- Corrupt pdf base64 URL for android version > 7.0
- Ionic3 cordova Base64 encodeFile not working in android 10 HOT 6
- Base64plugin not working after Installing the photoviewer plugin installed.
- Ionic convert mp4 file to base64, and I get empty result from console.log HOT 1
- files of more than 20 mb crash the app
- Return empty string in Android 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phonegap-base64.