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

Ensure HEIC files selectable from “Upload” button #66292

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function BackgroundImageControls( {
mediaId={ id }
mediaURL={ url }
allowedTypes={ [ IMAGE_BACKGROUND_TYPE ] }
accept="image/*"
accept="image/*, image/heic"
onSelect={ onSelectMedia }
popoverProps={ {
className: clsx( {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export function ImageEdit( {
onSelectURL={ onSelectURL }
onError={ onUploadError }
placeholder={ placeholder }
accept="image/*"
accept="image/*, image/heic"
allowedTypes={ ALLOWED_MEDIA_TYPES }
handleUpload={ ( files ) => files.length === 1 }
value={ { id, src } }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ export default function Image( {
mediaId={ id }
mediaURL={ url }
allowedTypes={ ALLOWED_MEDIA_TYPES }
accept="image/*"
accept="image/*, image/heic"
onSelect={ onSelectImage }
onSelectURL={ onSelectURL }
onError={ onUploadError }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default function PostFeaturedImageEdit( {
image = (
<MediaPlaceholder
onSelect={ onSelectImage }
accept="image/*"
accept="image/*, image/heic"
allowedTypes={ ALLOWED_MEDIA_TYPES }
onError={ onUploadError }
placeholder={ placeholder }
Expand Down Expand Up @@ -363,7 +363,7 @@ export default function PostFeaturedImageEdit( {
mediaId={ featuredImage }
mediaURL={ mediaUrl }
allowedTypes={ ALLOWED_MEDIA_TYPES }
accept="image/*"
accept="image/*, image/heic"
onSelect={ onSelectImage }
onError={ onUploadError }
onReset={ () => setFeaturedImage( 0 ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/form-file-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FormFileUpload } from '@wordpress/components';

const MyFormFileUpload = () => (
<FormFileUpload
accept="image/*"
accept="image/*, image/heic"
onChange={ ( event ) => console.log( event.currentTarget.files ) }
>
Upload
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/form-file-upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { FormFileUploadProps } from './types';
*
* const MyFormFileUpload = () => (
* <FormFileUpload
* accept="image/*"
* accept="image/*, image/heic"
adamsilverstein marked this conversation as resolved.
Show resolved Hide resolved
* onChange={ ( event ) => console.log( event.currentTarget.files ) }
* >
* Upload
Expand Down
Loading