Skip to content

Commit

Permalink
Accept only images in images admin file input (#4282)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi authored Dec 11, 2024
1 parent db5369a commit d913ab0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions adminSiteClient/ImagesIndexPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@ function PostImageButton({
}
}
return (
<Upload showUploadList={false} customRequest={uploadImage}>
<Upload
accept="image/*"
showUploadList={false}
customRequest={uploadImage}
>
<Button type="primary">
<FontAwesomeIcon icon={faUpload} /> Upload
</Button>
Expand All @@ -426,7 +430,11 @@ function PutImageButton({
}
}
return (
<Upload showUploadList={false} customRequest={uploadImage}>
<Upload
accept="image/*"
showUploadList={false}
customRequest={uploadImage}
>
<Button className="ImageIndexPage__update-image-button" type="text">
Upload new version
</Button>
Expand Down

0 comments on commit d913ab0

Please sign in to comment.