ionic-team / ionic-team/pwa-elements

feat: Camera should allow for additional `accept` types for file selection

Open
#80 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
171
Forks
50
PR merge metrics
No merged PRs in 30d

Description

**ionic/pwa-elements version:**
```
@ionic/pwa-elements@3.0.2
```

**I'm submitting a ...** (check one with "x")
[ ] bug report
[x] feature request

**Current behavior:**
At the moment `accept="image/*"` is hard coded as accepted input types, when users choose to select a local file/file from disk.

**Expected behavior:**
Enable configuration of PWA camera for specifying accepted input types e.g. `accept="image/png,image/jpeg"`

**Related code:**
https://github.com/ionic-team/pwa-elements/blob/6e1394a00b891a0242fea1f41b151681f1012d2a/src/components/camera/camera.tsx#L466-L471

**Other information:**
https://forum.ionicframework.com/t/restrict-file-types-in-pwa-camera-from-ionic-pwa-elements-when-selecting-local-image/208222

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.