Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 73
Closed
Description
I'm making an app where some data are stored in a SQL database. But in order to store images and videos I need to get the file uri first. I tried everything I could but nothing worked.
This is how my JS file looks like:
var imagepicker = require("nativescript-imagepicker"); var permissions = require( "nativescript-permissions" ); var ImageSourceModule = require("image-source"); function openImage(){var context = imagepicker.create({mode: "single" }); // use "multiple" for multiple selection context .authorize() .then(function(){return context.present()}) .then(function(selection){selection.forEach(function(selected){selected.getImage().then((source) =>{console.log(selected.fileUri)})})}).catch(function (e){alert(e);// process error })} exports.openImage = openImage; I can select images without a problem but then I get this error "selected.getImage is not a function".
Metadata
Metadata
Assignees
Labels
No labels