diff --git a/app/components/PageContent.tsx b/app/components/PageContent.tsx
index 696989f82..346120bb7 100644
--- a/app/components/PageContent.tsx
+++ b/app/components/PageContent.tsx
@@ -33,6 +33,7 @@ import List from "./List";
import TileGroup from "./inputs/TileGroup";
import { renderCheckboxFromStrapi } from "~/services/cms/models/StrapiCheckbox";
import { renderDateInputFromStrapi } from "~/services/cms/models/StrapiDateInput";
+import { renderFileInputFromStrapi } from "~/services/cms/models/StrapiFileInput";
import { renderAlertFromStrapi } from "~/services/cms/models/StrapiAlert";
type PageContentProps = {
@@ -88,6 +89,8 @@ function cmsToReact(cms: StrapiContent, templateReplacements: Replacements) {
return ;
case "form-elements.date-input":
return renderDateInputFromStrapi(replacedTemplate);
+ case "form-elements.file-input":
+ return renderFileInputFromStrapi(replacedTemplate);
case "form-elements.textarea":
return ;
case "form-elements.select":
diff --git a/app/services/cms/models/StrapiContent.ts b/app/services/cms/models/StrapiContent.ts
index dabb87c8b..9bcfc7fb1 100644
--- a/app/services/cms/models/StrapiContent.ts
+++ b/app/services/cms/models/StrapiContent.ts
@@ -16,6 +16,7 @@ import { StrapiListItemSchema } from "./StrapiListItem";
import { StrapiCheckboxSchema } from "./StrapiCheckbox";
import { StrapiTileGroupSchema } from "./StrapiTileGroup";
import { StrapiDateInputSchema } from "~/services/cms/models/StrapiDateInput";
+import { StrapiFileInputSchema } from "~/services/cms/models/StrapiFileInput";
import { StrapiAlertSchema } from "./StrapiAlert";
export const StrapiContentSchema = z.discriminatedUnion("__component", [
@@ -36,6 +37,7 @@ export const StrapiContentSchema = z.discriminatedUnion("__component", [
StrapiListItemSchema.required({ __component: true }),
StrapiTileGroupSchema.required({ __component: true }),
StrapiDateInputSchema.required({ __component: true }),
+ StrapiFileInputSchema.required({ __component: true }),
StrapiAlertSchema.required({ __component: true }),
]);
diff --git a/app/services/cms/models/StrapiFileInput.tsx b/app/services/cms/models/StrapiFileInput.tsx
new file mode 100644
index 000000000..2fee8c382
--- /dev/null
+++ b/app/services/cms/models/StrapiFileInput.tsx
@@ -0,0 +1,17 @@
+import { z } from "zod";
+import { HasOptionalStrapiIdSchema } from "./HasStrapiId";
+import UploadZone from "~/components/inputs/UploadZone";
+
+export const StrapiFileInputSchema = z
+ .object({
+ __component: z.literal("form-elements.file-input").optional(),
+ name: z.string(),
+ label: z.string().nullable(),
+ })
+ .merge(HasOptionalStrapiIdSchema);
+
+type StrapiFileInput = z.infer;
+
+export const renderFileInputFromStrapi = (strapiFileInput: StrapiFileInput) => {
+ return ;
+};
diff --git a/app/services/cms/models/StrapiFormComponent.ts b/app/services/cms/models/StrapiFormComponent.ts
index f2f7908d0..809965e05 100644
--- a/app/services/cms/models/StrapiFormComponent.ts
+++ b/app/services/cms/models/StrapiFormComponent.ts
@@ -6,10 +6,12 @@ import { StrapiTextareaSchema } from "./StrapiTextarea";
import { StrapiCheckboxSchema } from "./StrapiCheckbox";
import { StrapiTileGroupSchema } from "./StrapiTileGroup";
import { StrapiDateInputSchema } from "~/services/cms/models/StrapiDateInput";
+import { StrapiFileInputSchema } from "~/services/cms/models/StrapiFileInput";
export const StrapiFormComponentSchema = z.discriminatedUnion("__component", [
StrapiInputSchema.required({ __component: true }),
StrapiDateInputSchema.required({ __component: true }),
+ StrapiFileInputSchema.required({ __component: true }),
StrapiTextareaSchema.required({ __component: true }),
StrapiSelectSchema.required({ __component: true }),
StrapiDropdownSchema.required({ __component: true }),