IV를 암호화된 파일 및 썸네일 앞에 합쳐서 전송하도록 변경

This commit is contained in:
static
2026-01-11 00:29:59 +09:00
parent 5d130204a6
commit b9e6f17b0c
13 changed files with 161 additions and 76 deletions

View File

@@ -9,15 +9,11 @@ import {
import type { FileThumbnailUploadRequest } from "$lib/server/schemas";
import { trpc } from "$trpc/client";
export const requestFileDownload = async (
fileId: number,
fileEncryptedIv: string,
dataKey: CryptoKey,
) => {
export const requestFileDownload = async (fileId: number, dataKey: CryptoKey) => {
const cache = await getFileCache(fileId);
if (cache) return cache;
const fileBuffer = await downloadFile(fileId, fileEncryptedIv, dataKey);
const fileBuffer = await downloadFile(fileId, dataKey);
storeFileCache(fileId, fileBuffer); // Intended
return fileBuffer;
};