diff options
Diffstat (limited to 'lib/web/imageRouter/filesystem.js')
-rw-r--r-- | lib/web/imageRouter/filesystem.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/web/imageRouter/filesystem.js b/lib/web/imageRouter/filesystem.js index 4bf82b31..a2f8700d 100644 --- a/lib/web/imageRouter/filesystem.js +++ b/lib/web/imageRouter/filesystem.js @@ -1,5 +1,6 @@ 'use strict' const url = require('url') +const path = require('path') const config = require('../../config') const logger = require('../../logger') @@ -15,5 +16,5 @@ exports.uploadImage = function (imagePath, callback) { return } - callback(null, url.resolve(config.serverURL + '/', imagePath.match(/public\/(.+)$/)[1])) + callback(null, url.URL.resolve(config.serverURL + '/uploads/', path.basename(imagePath))) } |