Skip to content

Commit 7ffb247

Browse files
committed
improvement(whitelabeling): add SVG support for logo and wordmark uploads
1 parent 03b06e7 commit 7ffb247

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

apps/sim/app/workspace/[workspaceId]/settings/hooks/use-profile-picture-upload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createLogger } from '@sim/logger'
33

44
const logger = createLogger('ProfilePictureUpload')
55
const MAX_FILE_SIZE = 5 * 1024 * 1024 // 5MB
6-
const ACCEPTED_IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/jpg']
6+
const ACCEPTED_IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/jpg', 'image/svg+xml']
77

88
interface UseProfilePictureUploadProps {
99
onUpload?: (url: string | null) => void
@@ -41,7 +41,7 @@ export function useProfilePictureUpload({
4141
return `File "${file.name}" is too large. Maximum size is 5MB.`
4242
}
4343
if (!ACCEPTED_IMAGE_TYPES.includes(file.type)) {
44-
return `File "${file.name}" is not a supported image format. Please use PNG or JPEG.`
44+
return `File "${file.name}" is not a supported image format. Please use PNG, JPEG, or SVG.`
4545
}
4646
return null
4747
}, [])

apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export function WhitelabelingSettings() {
298298
<div className='grid grid-cols-2 gap-4'>
299299
<SettingRow
300300
label='Logo'
301-
description='Shown in the collapsed sidebar. Square image recommended (PNG or JPEG, max 5MB).'
301+
description='Shown in the collapsed sidebar. Square image recommended (PNG, JPEG, or SVG, max 5MB).'
302302
>
303303
<DropZone onDrop={logoUpload.handleFileDrop} className='flex items-center gap-4'>
304304
<button
@@ -345,7 +345,7 @@ export function WhitelabelingSettings() {
345345
<input
346346
ref={logoUpload.fileInputRef}
347347
type='file'
348-
accept='image/png,image/jpeg,image/jpg'
348+
accept='image/png,image/jpeg,image/jpg,image/svg+xml'
349349
onChange={logoUpload.handleFileChange}
350350
className='hidden'
351351
/>
@@ -354,7 +354,7 @@ export function WhitelabelingSettings() {
354354

355355
<SettingRow
356356
label='Wordmark'
357-
description='Shown in the expanded sidebar. Wide image recommended (PNG or JPEG, max 5MB).'
357+
description='Shown in the expanded sidebar. Wide image recommended (PNG, JPEG, or SVG, max 5MB).'
358358
>
359359
<DropZone onDrop={wordmarkUpload.handleFileDrop} className='flex items-center gap-4'>
360360
<button
@@ -401,7 +401,7 @@ export function WhitelabelingSettings() {
401401
<input
402402
ref={wordmarkUpload.fileInputRef}
403403
type='file'
404-
accept='image/png,image/jpeg,image/jpg'
404+
accept='image/png,image/jpeg,image/jpg,image/svg+xml'
405405
onChange={wordmarkUpload.handleFileChange}
406406
className='hidden'
407407
/>

0 commit comments

Comments
 (0)