Join image path with config.serverurl

This commit is contained in:
Yukai Huang 2016-11-16 10:50:07 +08:00
parent 8db6624ae9
commit 4d3672ae5d

4
app.js
View file

@ -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;