feat:增加转存资源列表展示与选择

This commit is contained in:
jiangrui
2025-02-25 12:53:27 +08:00
parent 8668bce863
commit c290f5a6d9
10 changed files with 226 additions and 45 deletions

View File

@@ -0,0 +1,9 @@
export const formattedFileSize = (size: number): string => {
if (size < 1024 * 1024) {
return `${(size / 1024).toFixed(2)}KB`;
}
if (size < 1024 * 1024 * 1024) {
return `${(size / 1024 / 1024).toFixed(2)}MB`;
}
return `${(size / 1024 / 1024 / 1024).toFixed(2)}GB`;
};

View File

@@ -4,7 +4,7 @@ import { RequestResult } from "../types/response";
const axiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL as string,
timeout: 9000,
timeout: 16000,
withCredentials: true,
headers: {
"Content-Type": "application/json",