0

I am using a file type input. It should accept only images file formats. So I added the following input tag -

<input type="file" accept="image/*" multiple (change)="selectFiles($event)" />

This works as expected on desktop i.e. It shows only these files on file browser. But on android devices it prompts the user to select either file browser or camera. Since we need images only from storage how can we disable the camera option. But is there any way to disable the camera option on mobile devices? I am looking for something opposite to capture="camera".

  • You'll have to validate the user selection because you can't reszrict the user from selecting other files. On the desktop file browser you can also select "All files" and select one that doesn't meet your criteria. –  Sep 28 '22 at 13:30
  • I want to not show camera option while uploading images in mobile browser, and on validations i will restrict select files. – Hasitha A Sep 28 '22 at 13:43
  • [This question](https://stackoverflow.com/questions/48503345/how-to-disable-camera-option-for-file-upload-from-mobile-browser) is technically an exact duplicate but it doesn't have any useful answers to the question sadly. –  Sep 28 '22 at 13:47

0 Answers0