1
votes

I am currently building a web app with ionic

in the input field, I need to upload a photo either from the camera or select from the gallery. the code I am using is

<ion-item>
              <input type="file" accept="image/*;capture=camera" name="imagefile"  
(change)="changeListener($event)">
            </ion-item>

however, on the PC, it shows the file browser, but on the mobile phone (android & ios), it just uses the camera. there is no option to select images from the image gallery.

I tried removing the capture=camera part, but still, it only calls out the camera on mobile devices. Is there any way to be able to select files from the device gallery?

1

1 Answers

0
votes

Have you figured this out? If not, I've found a great example for you to follow. ionic-pwa-camera-no-plugins

Hope this is helpful and please update your findings here.

Cheers.