mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-15 22:38:47 +00:00
파일 업로드/다운로드 현황을 모두 볼 수 있는 페이지 구현
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { getFileCache, storeFileCache, downloadFile } from "$lib/modules/file";
|
||||
import { formatFileSize } from "$lib/modules/util";
|
||||
|
||||
export const requestFileDownload = async (
|
||||
fileId: number,
|
||||
@@ -13,11 +12,3 @@ export const requestFileDownload = async (
|
||||
storeFileCache(fileId, fileBuffer); // Intended
|
||||
return fileBuffer;
|
||||
};
|
||||
|
||||
export const formatDownloadProgress = (progress?: number) => {
|
||||
return `${Math.floor((progress ?? 0) * 100)}%`;
|
||||
};
|
||||
|
||||
export const formatDownloadRate = (rate?: number) => {
|
||||
return `${formatFileSize((rate ?? 0) / 8)}/s`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user