Skip to content

Commit

Permalink
Revert "Ensure HEIC files selectable from “Upload” button (#66292)"
Browse files Browse the repository at this point in the history
This reverts commit c5921d7.
  • Loading branch information
cbravobernal committed Nov 19, 2024
1 parent fb9587e commit 6d288f1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/components/src/form-file-upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ export function FormFileUpload( {
{ children }
</Button>
);
// @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
// This can be removed once the Chromium fix is in the stable channel.
const compatAccept = !! accept?.includes( 'image/*' )
? `${ accept }, image/heic, image/heif`
: accept;

return (
<div className="components-form-file-upload">
Expand All @@ -62,7 +56,7 @@ export function FormFileUpload( {
ref={ ref }
multiple={ multiple }
style={ { display: 'none' } }
accept={ compatAccept }
accept={ accept }
onChange={ onChange }
onClick={ onClick }
data-testid="form-file-upload-input"
Expand Down

0 comments on commit 6d288f1

Please sign in to comment.