Skip to content

Commit 4195cf0

Browse files
committed
allow images for additional files
1 parent 4b0bf86 commit 4195cf0

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/resources/program-brand-assets/add-file-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function FileModalInner({
225225
? truncate(fileName, 25)
226226
: isEditing
227227
? `Current: ${truncate(existingResource?.name || "", 25)} (drop to replace)`
228-
: "Any document or zip file, max size of 10MB"
228+
: "Images, documents, or zip, max size of 10MB"
229229
}
230230
maxFileSizeMB={10}
231231
/>

apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/resources/program-brand-assets/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export function ProgramBrandAssets() {
279279

280280
<SettingsRow
281281
heading="Additional Files"
282-
description="Any document or zip file, max size 10 MB"
282+
description="Images, documents, or zip files, max size 10 MB"
283283
>
284284
<div className="flex flex-col gap-3">
285285
<div className="flex items-center justify-end">

packages/ui/src/file-upload.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,16 @@ const acceptFileTypes: Record<
4545
errorMessage: "File type not supported (.svg, .png, .jpg, or .webp only)",
4646
},
4747
programResourceFiles: {
48-
types: [...documentTypes, "application/zip"],
49-
errorMessage: "File type not supported (document or zip files only)",
48+
types: [
49+
"image/svg+xml",
50+
"image/png",
51+
"image/jpeg",
52+
"image/webp",
53+
...documentTypes,
54+
"application/zip",
55+
],
56+
errorMessage:
57+
"File type not supported (.svg, .png, .jpg, .webp, document, or zip files only)",
5058
},
5159
};
5260

0 commit comments

Comments
 (0)