提交 5af815e0 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 5bf3ae6f
......@@ -23,8 +23,8 @@ const isUploadStatic = conf.isUploadStatic
let fileCount = 1
async function uploadFile (prefixPath, dirFileName) {
const upFilePath = prefixPath.replace(new RegExp(DIR_PATH, 'gi'), '') + path.basename(dirFileName)
try {
const upFilePath = prefixPath.replace(new RegExp(DIR_PATH, 'gi'), '') + path.basename(dirFileName)
const result = await client.put(prefixPath + path.basename(dirFileName), dirFileName, {
headers,
timeout: 600000
......@@ -34,7 +34,7 @@ async function uploadFile (prefixPath, dirFileName) {
return { status: 200 }
}
} catch (err) {
console.log('第' + fileCount++ + '个文件,上传失败:' + conf.CDN_BASE + upFilePath)
console.log('第' + fileCount++ + '个文件,上传失败:' + conf.CDN_BASE + upFilePath, err)
return { status: 500, err: err }
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论