파일 다운로드 스케쥴링 및 진행률 표시 기능 구현

This commit is contained in:
static
2025-01-18 08:20:09 +09:00
parent 620d174e9b
commit bde090c464
7 changed files with 214 additions and 73 deletions

View File

@@ -120,7 +120,7 @@ const encryptFile = limitFunction(
{ concurrency: 4 },
);
const uploadFileInternal = limitFunction(
const requestFileUpload = limitFunction(
async (status: Writable<FileUploadStatus>, form: FormData) => {
status.update((value) => {
value.status = "uploading";
@@ -209,7 +209,7 @@ export const uploadFile = async (
);
form.set("content", new Blob([fileEncrypted.ciphertext]));
await uploadFileInternal(status, form);
await requestFileUpload(status, form);
return true;
} catch (e) {
status.update((value) => {