mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00: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:
@@ -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}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user