Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
feat(files): preview HEIC photos in the file viewer#6350
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
64c8392a83cfce76e496dc1aec8b6e1de2c9165266File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -44,10 +44,12 @@ const IFRAME_PREVIEWABLE_MIME_TYPES = new Set([ | ||
| const IFRAME_PREVIEWABLE_EXTENSIONS = new Set(['pdf']) | ||
| /** | ||
| * Image formats every supported browser decodes natively. `.tif`/`.tiff` and | ||
| * `.heic`/`.heif` are accepted uploads but deliberately absent — no browser renders | ||
| * them in an `<img>`, so they stay on the download-only path rather than showing a | ||
| * broken image. | ||
| * Formats the image viewer can show. Most are decoded by the browser directly; | ||
| * `.heic`/`.heif` are not — no browser outside Safari renders them — but the serve | ||
| * route transcodes them to JPEG, so an `<img>` pointed at it works. | ||
| * | ||
| * `.tif`/`.tiff` are accepted uploads and deliberately absent: nothing decodes them | ||
| * on either side, so they stay download-only rather than showing a broken image. | ||
| */ | ||
| const IMAGE_PREVIEWABLE_MIME_TYPES = new Set([ | ||
| 'image/png', | ||
| @@ -58,6 +60,8 @@ const IMAGE_PREVIEWABLE_MIME_TYPES = new Set([ | ||
| 'image/bmp', | ||
| 'image/x-icon', | ||
| 'image/vnd.microsoft.icon', | ||
| 'image/heic', | ||
| 'image/heif', | ||
| ]) | ||
| const IMAGE_PREVIEWABLE_EXTENSIONS = new Set([ | ||
| 'png', | ||
| @@ -68,6 +72,8 @@ const IMAGE_PREVIEWABLE_EXTENSIONS = new Set([ | ||
| 'avif', | ||
| 'bmp', | ||
| 'ico', | ||
| 'heic', | ||
| 'heif', | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ]) | ||
| const AUDIO_PREVIEWABLE_MIME_TYPES = new Set([ | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.