From 4d3672ae5d52b781ea1a740142a74ba416833113 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 16 Nov 2016 10:50:07 +0800 Subject: Join image path with config.serverurl --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index b67c77c2..16ef798e 100644 --- a/app.js +++ b/app.js @@ -421,8 +421,10 @@ app.post('/uploadimage', function (req, res) { try { switch (config.imageUploadType) { case 'filesystem': + var path = require('path'); + res.send({ - link: files.image.path.match(/^public(.+$)/)[1] + link: path.join(config.serverurl, files.image.path.match(/^public(.+$)/)[1]) }); break; -- cgit v1.2.3