Is it possible to check if an image is taken by camera or uploaded from photo library by JavaScript?

Qiang

My intention is to force the mobile browser to open camera taking pictures instead of allowing users to upload images from photo library. Is it possible to disable the "upload from library" option on safari/chrome and show "use camera" only?

Daryl

This worked for me on my Galaxy S6. I can't speak to other Android devices.

<input type="file" accept="image/*" capture="camera"/>

A side note -

If anyone comes here looking for an iOS solution to this problem, it looks like as of 5/10/2016, WebRTC is not supported for the Safari browser and it is not yet possible to disable the upload from library functionality. See this StackOverflow article and related wiki page on the topic.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ImageView does not display image taken from phone camera or photo gallery

From Dev

Resize image taken from gallery or camera, before being uploaded

From Dev

How to determine whether an image was taken from the library or from the camera

From Dev

Is it possible to display an image over a photo taken in app

From Dev

Ionic app image upload from camera / photo library

From Dev

Uploading an image from Photo Library or Camera to Firebase storage (Swift)

From Dev

How to save image from camera/photo library into an array that is to be displayed in a UICollectionView

From Dev

Android - Saving photo taken from Camera , Out of memory

From Dev

Trying to display image taken from camera intent

From Dev

Set image taken from camera into an ImageView

From Dev

taken from android camera image original resolution

From Dev

Saving image taken from camera into INTERNAL storage

From Dev

Read thumbnail image taken from phone camera

From Dev

Swift - how to get last taken 3 photos from photo library?

From Dev

put in a frame image taken from the camera or on own camera

From Dev

I want to read exif info in image in android. I can read exif from image in gallery but i cannot read exif photo taken from the camera

From Dev

How to detect if photo was taken (camera intent)

From Dev

Photo taken through camera intent is losing on quality

From Dev

How can i set an image taken from the Camera intent into a ImageView?

From Dev

Photo Library/Camera settings programmatically

From Dev

Choose photo from camera

From Dev

How to pass an image from camera/camera roll to a new view after it has been chosen/taken?

From Dev

Ask user to choose photo from photo library or camera with swift2

From Dev

Delete picture taken from camera

From Dev

Custom camera shows dark picture preview when photo taken on Nexus

From Dev

Android Camera: Get Picture Uri after the photo is taken

From Dev

Android: Can't get the size of photo taken by camera acitivity

From Dev

How to change the shape of an uploaded image (Image from photo gallery) into circular form

From Dev

VBScript to extract "Date Taken" from a photo

Related Related

  1. 1

    ImageView does not display image taken from phone camera or photo gallery

  2. 2

    Resize image taken from gallery or camera, before being uploaded

  3. 3

    How to determine whether an image was taken from the library or from the camera

  4. 4

    Is it possible to display an image over a photo taken in app

  5. 5

    Ionic app image upload from camera / photo library

  6. 6

    Uploading an image from Photo Library or Camera to Firebase storage (Swift)

  7. 7

    How to save image from camera/photo library into an array that is to be displayed in a UICollectionView

  8. 8

    Android - Saving photo taken from Camera , Out of memory

  9. 9

    Trying to display image taken from camera intent

  10. 10

    Set image taken from camera into an ImageView

  11. 11

    taken from android camera image original resolution

  12. 12

    Saving image taken from camera into INTERNAL storage

  13. 13

    Read thumbnail image taken from phone camera

  14. 14

    Swift - how to get last taken 3 photos from photo library?

  15. 15

    put in a frame image taken from the camera or on own camera

  16. 16

    I want to read exif info in image in android. I can read exif from image in gallery but i cannot read exif photo taken from the camera

  17. 17

    How to detect if photo was taken (camera intent)

  18. 18

    Photo taken through camera intent is losing on quality

  19. 19

    How can i set an image taken from the Camera intent into a ImageView?

  20. 20

    Photo Library/Camera settings programmatically

  21. 21

    Choose photo from camera

  22. 22

    How to pass an image from camera/camera roll to a new view after it has been chosen/taken?

  23. 23

    Ask user to choose photo from photo library or camera with swift2

  24. 24

    Delete picture taken from camera

  25. 25

    Custom camera shows dark picture preview when photo taken on Nexus

  26. 26

    Android Camera: Get Picture Uri after the photo is taken

  27. 27

    Android: Can't get the size of photo taken by camera acitivity

  28. 28

    How to change the shape of an uploaded image (Image from photo gallery) into circular form

  29. 29

    VBScript to extract "Date Taken" from a photo

HotTag

Archive