feat: 0.1.2

1. login page && auth required
  2. file dir cleanup
This commit is contained in:
loveuer
2025-05-09 17:49:12 +08:00
parent a2635698e0
commit b1b3ac5b6b
31 changed files with 1178 additions and 36 deletions

View File

@ -17,7 +17,7 @@ export const useFileUpload = () => {
try {
console.log(`[D] api.Upload: upload file = ${file.name}, size = ${file.size}`, file);
const url = `/api/share/${file.name}`;
const url = `/api/ushare/${file.name}`;
// 1. 初始化上传
const res1 = await fetch(url, {
@ -51,7 +51,7 @@ export const useFileUpload = () => {
const end = Math.min(start + CHUNK_SIZE, file.size);
const chunk = file.slice(start, end);
const res = await fetch(`/api/share/${code}`, {
const res = await fetch(`/api/ushare/${code}`, {
method: "POST",
headers: {
"Range": `bytes=${start}-${end - 1}`,