upload base64 fix

This commit is contained in:
2025-11-10 11:24:50 +08:00
parent f79629e97e
commit 9c045f32ea
4 changed files with 53 additions and 5 deletions

View File

@@ -162,7 +162,7 @@ export async function uploadFile(config: Config, file: File): Promise<string> {
if (!res.ok) throw new Error(`Upload failed: ${text}`);
return `✅ Uploaded ${file.name} successfully`;
}
export async function uploadFileBase64(config: Config, base64File: { name: string; data: string }): Promise<string> {
export async function uploadFileBase64(config: Config, base64File: { name: string; data: string; }): Promise<string> {
const remoteName = path.basename(base64File.name);
// 1. Dapatkan upload link (pakai Authorization)