mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
fix(web): fetch hello-world from local (#3062)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import type { BlobStorage } from '@blocksuite/store';
|
||||
|
||||
export const createStaticStorage = (): BlobStorage => {
|
||||
return {
|
||||
crud: {
|
||||
get: async (key: string) => {
|
||||
if (key.startsWith('/static/')) {
|
||||
const response = await fetch(key);
|
||||
return response.blob();
|
||||
}
|
||||
return null;
|
||||
},
|
||||
set: async (key: string) => {
|
||||
// ignore
|
||||
return key;
|
||||
},
|
||||
delete: async () => {
|
||||
// ignore
|
||||
},
|
||||
list: async () => {
|
||||
// ignore
|
||||
return [];
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user