From c0ba28c0133c08cf1859a6e3dfcb6dca00d11dd9 Mon Sep 17 00:00:00 2001 From: "cn.yimian.xyz" Date: Thu, 18 Jun 2020 11:33:18 +0800 Subject: [PATCH] back to iii --- src/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 3f3f727..dab917c 100644 --- a/src/index.js +++ b/src/index.js @@ -67,11 +67,11 @@ app.post('/', multer({ o.message = 'Fail to remove TMP file..'; } }); - o.data.push('https://storage.yimian.xyz/'+prefix); if(o.data.length == files.length) { - res.end(JSON.stringify(o)); + // res.end(JSON.stringify(o)); } }); + o.data.push('https://storage.yimian.xyz/'+prefix); //获取文件基本信息 /* @@ -82,6 +82,7 @@ app.post('/', multer({ */ } // 设置响应类型及编码 + res.end(JSON.stringify(o)); } }); @@ -138,13 +139,13 @@ app.post('/imgbed', multer({ o.message = 'Fail to remove TMP file..'; } }); - o.data.push('https://api.yimian.xyz/img/?path='+prefix); if(o.data.length == files.length){ - res.end(JSON.stringify(o)); + // res.end(JSON.stringify(o)); } }); + o.data.push('https://api.yimian.xyz/img/?path='+prefix); //获取文件基本信息 /* @@ -155,5 +156,6 @@ app.post('/imgbed', multer({ */ } // 设置响应类型及编码 + res.end(JSON.stringify(o)); } });