Comments (4)
Dang, that was it! Thank you @NathanWalker and I have to say after coming back to {N} after all these years, the dev experience is really slick. 🙏
from plugins.
Thank you for confirming, let us know any other snags - your feedback is always much appreciated!
from plugins.
Welcome back @rdlauer 😄
from plugins.
Hi @rdlauer! Indeed 2.0 and above brought a small breaking change in the return result to provide more rich information noted here:
https://github.com/NativeScript/plugins/tree/main/packages/imagepicker#installation - can see the Note
in that section.
Looking at the SB sample looks like this:
imagePicker
.authorize()
.then(() => {
return imagePicker.present();
})
.then((selection) => {
console.log('Selection done: ' + JSON.stringify(selection));
just needs to be updated to this:
imagePicker
.authorize()
.then(() => {
return imagePicker.present();
})
.then((selection) => {
console.log('Selection done: ' + JSON.stringify(selection));
this.set(
'imageSrc',
this.isSingleMode && selection.length > 0 ? selection[0].asset : null
);
// set the images to be loaded from the assets with optimal sizes (optimize memory usage)
selection.forEach((item: imagePickerPlugin.ImagePickerSelection) => {
item.asset.options.width = this.isSingleMode
? this.previewSize
: this.thumbSize;
item.asset.options.height = this.isSingleMode
? this.previewSize
: this.thumbSize;
});
this.set(
'imageAssets',
selection.map((item, i) => ({ imageAsset: item.asset, index: i }))
);
})
This forked SB has the change: https://stackblitz.com/edit/nativescript-stackblitz-templates-1byxnc?file=package.json,app%2Fmain-view-model.ts
Stackblitz has a Wasm issue on file uploads at moment so if link doesn't run in Preview, you can run it locally.
Let us know if that clears ya!
from plugins.
Related Issues (20)
- Nativescript Angular IOS : Domain=NSURLErrorDomain Code=-1001 "The request timed out." when uploading files HOT 1
- [@nativescript/google-maps] Are there any feature utils for clustering or heat map?
- Push notifications do not work if the App is in Background HOT 1
- Unable to create Google Maps custom infoWindow on iOS HOT 1
- Unable to change transparency on TileOverlay on Android HOT 2
- [@nativescript/google-signin] Interfaces is not defined in worker HOT 2
- Build failure for latest @nativescript/background-http v6.0.1 HOT 4
- [@nativescript/datetimepicker] Bug in datetimepicker callback showing false date
- [@nativescript/geolocation] unable to compile Android version as I get a `Execution failed for task ':app:checkDebugDuplicateClasses'.` HOT 19
- @nativescript/imagepicker does not show selected image after app is build in release mode HOT 7
- imagepicker with NativeScript Vue is not working HOT 2
- [@nativescript/google-maps] New Android Google Maps SDK renderer HOT 1
- [nativescript-videorecorder] iOS: Cancelling camera does not resolve.
- myLocationButtonEnabled not working on iOS HOT 1
- [@nativescript/google-maps]: Support for MapId for styling through Google Cloud
- AnimatedCircle plugin is not changing textSize HOT 2
- DRCircularProgressView is not defined
- [@nativescript/picker] open picker programmatically
- [@nativescript/google-signin] iOS GIDSignIn object missing signin JS functions when deployed to TestFlight\AppStore 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 plugins.