mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-24 14:21:51 +03:00
fix(workspace): cloud workspace blob uploading
This commit is contained in:
parent
7094385d8b
commit
023cbc30ea
@ -55,13 +55,14 @@ export const createAffineBlobStorage = (
|
||||
},
|
||||
set: async (key, value) => {
|
||||
const db = await dbPromise;
|
||||
const arrayBuffer = await value.arrayBuffer();
|
||||
const t = db
|
||||
.transaction('uploading', 'readwrite')
|
||||
.objectStore('uploading');
|
||||
let uploaded = false;
|
||||
t.put({
|
||||
key,
|
||||
arrayBuffer: await value.arrayBuffer(),
|
||||
arrayBuffer,
|
||||
type: value.type,
|
||||
}).then(() => {
|
||||
// delete the uploading blob after uploaded
|
||||
|
Loading…
Reference in New Issue
Block a user