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

feat(camera): allow for additional accept types for image selection #127

Open
wants to merge 1 commit into
base: feature-3.3
Choose a base branch
from

Conversation

sean-perkins
Copy link
Contributor

Resolves #80

Adds an additional property to the pwa-camera to allow developers to specify additional acceptable file types when a camera device is not available. This feature is intended to be used to restrict the file types to more specific patterns than the default image/* matches to. For example, restricting to only png or jpeg image file types.

@sean-perkins sean-perkins requested review from a team and brandyscarney and removed request for a team July 21, 2023 15:43
@Flusinerd
Copy link

Hi, I just stumbled across this, since I was looking for this functionality.
Ty first of all for the implementation.

When will this be merged?

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be added to camera-modal and camera-modal-instance too.

The normal usage for Camera plugin and most pwa-elements users is to create a camera-modal, camera-modal then creates the camera-modal-instance, and camera-modal-instance uses the pwa-camera internally, users don't usually use the pwa-camera directly. So for being able to set the accept in the pwa-camera, all intermediary accept props are needed.

Also, #80 is about the accept attribute of file picker shown if the user clicks the pick-image button, this has been applied to the fallback picker when the camera is not available, they are different.
I think it should be applied to both pickers (and update the docs accordingly since now it only talks about the fallback).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants