Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public takePicture(sourceType) {
- this.photosService.takePicture(sourceType)
- .then((newFileName) => {
- this.loading = this.loadingCtrl.create({
- content: 'Ajout de la photo...',
- })
- this.loading.present()
- return this.photosService.upload(this.venue.id, newFileName)
- })
- .then((data: FileUploadResult) => {
- // stuff with data returned by server
- this.loading.dismissAll()
- this.resetVenuePhotoProfile()
- this.presentToast('Photo ajoutée')
- })
- .catch(err => {
- if (this.loading)
- this.loading.dismissAll()
- this.presentToast(err)
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement