File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/components/src/form-file-upload Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ export function FormFileUpload( {
47
47
{ children }
48
48
</ Button >
49
49
) ;
50
+ // @todo : Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
51
+ // from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
52
+ // This can be removed once the Chromium fix is in the stable channel.
53
+ const compatAccept = ! ! accept ?. includes ( 'image/*' )
54
+ ? `${ accept } , image/heic, image/heif`
55
+ : accept ;
50
56
51
57
return (
52
58
< div className = "components-form-file-upload" >
@@ -56,7 +62,7 @@ export function FormFileUpload( {
56
62
ref = { ref }
57
63
multiple = { multiple }
58
64
style = { { display : 'none' } }
59
- accept = { accept }
65
+ accept = { compatAccept }
60
66
onChange = { onChange }
61
67
onClick = { onClick }
62
68
data-testid = "form-file-upload-input"
You can’t perform that action at this time.
0 commit comments