@sagrus wrote:
Good day! I make a multi-selection of images from the gallery in the application. I use @ionic-native/image-picker@4. When you select one image everything works fine but if you select two or more images the app crush. Help please.
This is my code:
fromGallery() { let options: ImagePickerOptions = { quality: 100, width: 600, height: 600, outputType: 1, maximumImagesCount: 15 }; this.imagePicker.getPictures(options).then((results) => { console.log('Results', results); for (let index = 0; index < results.length; index++) { this.imgs.push('data:image/jpeg;base64,' + results[index]); } console.log('Image Lists', this.imgs); }, (error) => { console.log('Error occurred while loading', error); }); }
package.json:
{ "name": "zaholod", "version": "0.0.1", "author": "Ionic Framework", "homepage": "http://ionicframework.com/", "private": true, "scripts": { "start": "ionic-app-scripts serve", "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint" }, "dependencies": { "@angular/animations": "5.2.11", "@angular/common": "5.2.11", "@angular/compiler": "5.2.11", "@angular/compiler-cli": "5.2.11", "@angular/core": "5.2.11", "@angular/forms": "5.2.11", "@angular/http": "5.2.11", "@angular/platform-browser": "5.2.11", "@angular/platform-browser-dynamic": "5.2.11", "@ionic-native/camera": "^4.19.0", "@ionic-native/core": "~4.18.0", "@ionic-native/fcm": "^4.19.0", "@ionic-native/geolocation": "^4.19.0", "@ionic-native/http": "^4.19.0", "@ionic-native/image-picker": "^4.19.0", "@ionic-native/splash-screen": "~4.18.0", "@ionic-native/status-bar": "~4.18.0", "@ionic/storage": "2.2.0", "cordova-android": "7.0.0", "cordova-browser": "5.0.4", "cordova-plugin-advanced-http": "^2.0.2", "cordova-plugin-camera": "^4.0.3", "cordova-plugin-device": "^2.0.2", "cordova-plugin-fcm-with-dependecy-updated": "^2.4.0", "cordova-plugin-file": "^6.0.1", "cordova-plugin-geolocation": "^4.0.1", "cordova-plugin-ionic-keyboard": "^2.1.3", "cordova-plugin-ionic-webview": "^2.3.1", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-telerik-imagepicker": "^2.2.2", "cordova-plugin-whitelist": "^1.3.3", "ionic-angular": "3.9.2", "ionicons": "3.0.0", "rxjs": "5.5.11", "sw-toolbox": "3.6.0", "zone.js": "0.8.26" }, "devDependencies": { "@ionic/app-scripts": "3.2.1", "typescript": "~2.6.2" }, "description": "An Ionic project", "cordova": { "plugins": { "cordova-plugin-advanced-http": {}, "cordova-plugin-whitelist": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-camera": {}, "cordova-plugin-telerik-imagepicker": { "PHOTO_LIBRARY_USAGE_DESCRIPTION": "your usage message" }, "cordova-plugin-fcm-with-dependecy-updated": {}, "cordova-plugin-geolocation": { "GEOLOCATION_USAGE_DESCRIPTION": "To locate you" } }, "platforms": [ "browser", "android" ] } }
Posts: 1
Participants: 1