fix: 上传失败时抛出错误&恢复 cdn 配置

This commit is contained in:
Volankey 2025-08-21 20:51:30 +08:00
parent bacb60fb43
commit f3aaf89d25
2 changed files with 3 additions and 2 deletions

View File

@ -90,6 +90,7 @@ async function uploadFile(filePath: string, basePath: string): Promise<void> {
console.log(`上传成功: ${key}, 请求ID: ${response.requestId}`);
} catch (error) {
console.error(`上传文件 ${filePath} 失败:`, error);
throw error;
}
}

View File

@ -4,8 +4,8 @@ import { fileURLToPath, URL } from 'node:url'
import fs from 'fs'
export default defineConfig({
// base: process.env.NODE_ENV === 'production' ? 'https://cdn.kdesign.top/' : '/',
base: '/',
base: process.env.NODE_ENV === 'production' ? 'https://cdn.kdesign.top/' : '/',
// base: '/',
plugins: [
vue(),
// 添加自定义中间件来处理根路径