summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYukai Huang2016-11-16 10:50:07 +0800
committerYukai Huang2016-11-16 10:50:07 +0800
commit4d3672ae5d52b781ea1a740142a74ba416833113 (patch)
treef00fc66d41e18d6113037b9b260adad4315afb20
parent8db6624ae99ed23485213e68bfb41b76af4b4fc5 (diff)
Join image path with config.serverurl
-rw-r--r--app.js4
1 files changed, 3 insertions, 1 deletions
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;