firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.12k stars 184 forks source link

Cannot read properties of undefined (reading 'startsWith') #615

Closed VisetDev closed 5 months ago

VisetDev commented 5 months ago

Trying to add a image storage field from a document property:

onFetch {profile_url: 'artists/imgs/profile/prof (1).jpg'} <--- entity

const profile_url = buildProperty({
    dataType: "string",
    name: "URL",
    id: "profile_url",
    propertyConfig: 'file_upload',
    storage: {
        storagePath: '/',
    },
});

results in:

TypeError: Cannot read properties of undefined (reading 'startsWith') at tde (StorageThumbnail.tsx:77:15) at ede (StorageThumbnail.tsx:58:49)

image

image

this is deployed to app.firecms.co (it also happens in dev) hope it's clear enough. tx

VisetDev commented 5 months ago

hi @fgatti675 ! found this: https://github.com/firecmsco/firecms/issues/550#issuecomment-1932606634

it has to do with the file type setting.