From ede5c671b83fb8aea1519aa63f62fc14276acec6 Mon Sep 17 00:00:00 2001 From: Said Akhrarov <36972061+akhrarovsaid@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:11:24 -0400 Subject: [PATCH] fix(plugin-seo): thread allowCreate to meta image component (#12624) ### What? This PR fixes an issue with `plugin-seo` where the `MetaImageComponent` would not allow creating a new upload document from the field. ### Why? To allow users to upload new media documents for use as a meta image. ### How? Threads `allowCreate` through to the underlying upload input. Fixes #12616 Before: ![image](https://github.com/user-attachments/assets/44ec32c7-1912-4fc3-9b8a-f5deb167320b) After: ![image](https://github.com/user-attachments/assets/0dba1f75-78b6-4472-af38-6178f2ab26ea) --- .../plugin-seo/src/fields/MetaImage/MetaImageComponent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-seo/src/fields/MetaImage/MetaImageComponent.tsx b/packages/plugin-seo/src/fields/MetaImage/MetaImageComponent.tsx index b42ee5932..4001a1942 100644 --- a/packages/plugin-seo/src/fields/MetaImage/MetaImageComponent.tsx +++ b/packages/plugin-seo/src/fields/MetaImage/MetaImageComponent.tsx @@ -29,7 +29,7 @@ type MetaImageProps = { export const MetaImageComponent: React.FC = (props) => { const { - field: { label, localized, relationTo, required }, + field: { admin: { allowCreate } = {}, label, localized, relationTo, required }, hasGenerateImageFn, readOnly, } = props @@ -175,6 +175,7 @@ export const MetaImageComponent: React.FC = (props) => { }} >