feat: 支持ZIP压缩包上传(含密码保护)

This commit is contained in:
CHE LIANG ZHAO
2026-01-23 13:46:45 +08:00
parent 49e3176e6b
commit a97a8d6a20
22 changed files with 973 additions and 72 deletions

View File

@@ -100,7 +100,7 @@ export interface MonthlyStatsResponse {
export async function uploadBill(
file: File,
type: BillType,
options?: { year?: number; month?: number }
options?: { year?: number; month?: number; password?: string }
): Promise<UploadResponse> {
const formData = new FormData();
formData.append('file', file);
@@ -112,6 +112,9 @@ export async function uploadBill(
if (options?.month) {
formData.append('month', options.month.toString());
}
if (options?.password) {
formData.append('password', options.password);
}
const response = await apiFetch(`${API_BASE}/api/upload`, {
method: 'POST',