mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 10:31:50 +08: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 {
|
return {
|
||||||
crud: {
|
crud: {
|
||||||
get: async key => {
|
get: async key => {
|
||||||
const suffix = predefinedStaticFiles.includes(key)
|
const suffix = key.startsWith('/')
|
||||||
|
? key
|
||||||
|
: predefinedStaticFiles.includes(key)
|
||||||
? `/static/${key}`
|
? `/static/${key}`
|
||||||
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user