From 58189d40351ea7af743f96554c336c73af9bd6ba Mon Sep 17 00:00:00 2001 From: yanmao <55792257+yanmao-cc@users.noreply.github.com> Date: Sat, 18 Dec 2021 18:58:23 +0800 Subject: [PATCH] Update upload.js --- site-ssr/app/controller/upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-ssr/app/controller/upload.js b/site-ssr/app/controller/upload.js index 7dced72c..1ea8eb0b 100644 --- a/site-ssr/app/controller/upload.js +++ b/site-ssr/app/controller/upload.js @@ -183,7 +183,6 @@ class UploadController extends Controller { osDir === 'win' ? '.exe' : '' }`, ); - if (osDir !== 'win') fs.chmod('777', probePath); ffmpeg.setFfprobePath(probePath); ffmpeg.ffprobe(filePath, (err, metadata) => { const fileName = new Date().getTime() + '-v-image.png'; // stream对象也包含了文件名,大小等基本信息 @@ -219,6 +218,7 @@ class UploadController extends Controller { }); } catch (err) { console.error(err); + result.message = err.message; resolve(result); } });