feat: 支持ZIP压缩包上传(含密码保护)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user