Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File upload, HTML capture attribute not working #378

Closed
worldhugo opened this issue Mar 2, 2019 · 11 comments
Closed

File upload, HTML capture attribute not working #378

worldhugo opened this issue Mar 2, 2019 · 11 comments
Labels
Help wanted Extra attention is needed Stale Type: feature request New feature or request

Comments

@worldhugo
Copy link

Hi,

using capture="camera" not working properly on Android (not tested on iOS). Normally, the camera app should automatically start, but with the react-native-webview I have to "choose an action" (between "camera app" and "my files").

Thanks,

Hugo

@andreipfeiffer
Copy link
Contributor

I see this as being a nice enhancement.

The capture attribute has 3 possible values, as described in the standard https://www.w3.org/TR/html-media-capture/#the-capture-attribute:

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

Also, the capture attribute is not very well supported at the moment:
https://caniuse.com/#feat=html-media-capture

@jamonholmgren jamonholmgren added Type: feature request New feature or request Help wanted Extra attention is needed labels Mar 7, 2019
@jamonholmgren
Copy link
Member

This would be nice, for sure.

@maple10001
Copy link

Tested on ios, upload btn always opens the camera. Would love to see it works on android.

@github-actions
Copy link

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@eisenheim94
Copy link

eisenheim94 commented Jan 15, 2020

It is still not working on Android as might. On iOS it works fine.

Also, without "accept" attribute on Android it opens only media library, so there is no option to take a picture with camera.

@safaiyeh safaiyeh reopened this Jan 15, 2020
@coisnepe
Copy link

Running into this issue also. I know nothing about Android development but isn't it simply because the capture method is missing? Looks like there are only file picker methods:

protected void openFileChooser(ValueCallback<Uri> filePathCallback, String acceptType, String capture) {

@munawirrahman
Copy link

Hi Folks,

Seems like this issue still happening in android

@herujest
Copy link

this issue still happening in android

@syahirdev
Copy link

Hi, any updates on this? The issue still happening in android.

@jlapp9
Copy link
Contributor

jlapp9 commented May 17, 2023

Does #2954 solve this?

@robxyy
Copy link
Contributor

robxyy commented May 18, 2023

Does #2954 solve this?

Yes, but user or environment is not supported, it's blocked by FileChooserParams - no capture value provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Extra attention is needed Stale Type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests