summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-12-20 22:42:17 +0100
committerGitHub2018-12-20 22:42:17 +0100
commitf492fea41859983a460e791e099cd5d845ebb9fc (patch)
tree93da6eb787179e2bec904ecce288840bfd1d5061 /lib
parent17b1b5d6bf57da98e5bf15ac143f502dee9ac53d (diff)
parent0621d7a72d3ed36a120a5b187e2ea07c8dde7c38 (diff)
Merge pull request #1103 from SISheogorath/fix/localImageUpload
Fix usage of new URL API
Diffstat (limited to '')
-rw-r--r--lib/web/imageRouter/filesystem.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/web/imageRouter/filesystem.js b/lib/web/imageRouter/filesystem.js
index a2f8700d..7c876d66 100644
--- a/lib/web/imageRouter/filesystem.js
+++ b/lib/web/imageRouter/filesystem.js
@@ -1,5 +1,5 @@
'use strict'
-const url = require('url')
+const URL = require('url').URL
const path = require('path')
const config = require('../../config')
@@ -16,5 +16,5 @@ exports.uploadImage = function (imagePath, callback) {
return
}
- callback(null, url.URL.resolve(config.serverURL + '/uploads/', path.basename(imagePath)))
+ callback(null, (new URL(path.basename(imagePath), config.serverURL + '/uploads/')).href)
}