fix: 上传失败时抛出错误&恢复 cdn 配置
This commit is contained in:
parent
bacb60fb43
commit
f3aaf89d25
@ -90,6 +90,7 @@ async function uploadFile(filePath: string, basePath: string): Promise<void> {
|
|||||||
console.log(`上传成功: ${key}, 请求ID: ${response.requestId}`);
|
console.log(`上传成功: ${key}, 请求ID: ${response.requestId}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`上传文件 ${filePath} 失败:`, error);
|
console.error(`上传文件 ${filePath} 失败:`, error);
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { fileURLToPath, URL } from 'node:url'
|
|||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// base: process.env.NODE_ENV === 'production' ? 'https://cdn.kdesign.top/' : '/',
|
base: process.env.NODE_ENV === 'production' ? 'https://cdn.kdesign.top/' : '/',
|
||||||
base: '/',
|
// base: '/',
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
// 添加自定义中间件来处理根路径
|
// 添加自定义中间件来处理根路径
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user