mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
썸네일을 메모리와 OPFS에 캐시하도록 개선
This commit is contained in:
@@ -2,7 +2,7 @@ import { getContext, setContext } from "svelte";
|
||||
import { callGetApi, callPostApi } from "$lib/hooks";
|
||||
import { storeHmacSecrets } from "$lib/indexedDB";
|
||||
import { generateDataKey, wrapDataKey, unwrapHmacSecret, encryptString } from "$lib/modules/crypto";
|
||||
import { storeFileCache, deleteFileCache, uploadFile } from "$lib/modules/file";
|
||||
import { storeFileCache, deleteFileCache, storeFileThumbnail, uploadFile } from "$lib/modules/file";
|
||||
import type {
|
||||
DirectoryRenameRequest,
|
||||
DirectoryCreateRequest,
|
||||
@@ -81,6 +81,10 @@ export const requestFileUpload = async (
|
||||
if (!res) return false;
|
||||
|
||||
storeFileCache(res.fileId, res.fileBuffer); // Intended
|
||||
if (res.thumbnailBuffer) {
|
||||
storeFileThumbnail(res.fileId, res.thumbnailBuffer); // Intended
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user