mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 07:51:45 +03:00
fix(core): blob key issue for cloud blob provider (#4907)
There are some resources that only exists on `/static`. Current prefix check is incorrect since it could start with `/static`
This commit is contained in:
parent
34c5e7d83d
commit
add20ec2f8
@ -15,7 +15,9 @@ export const createCloudBlobStorage = (workspaceId: string): BlobStorage => {
|
||||
return {
|
||||
crud: {
|
||||
get: async key => {
|
||||
const suffix = predefinedStaticFiles.includes(key)
|
||||
const suffix = key.startsWith('/')
|
||||
? key
|
||||
: predefinedStaticFiles.includes(key)
|
||||
? `/static/${key}`
|
||||
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user