Skip to content

Commit f492fea

Browse files
authored
Merge pull request #1103 from SISheogorath/fix/localImageUpload
Fix usage of new URL API
2 parents 17b1b5d + 0621d7a commit f492fea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web/imageRouter/filesystem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict'
2-
const url = require('url')
2+
const URL = require('url').URL
33
const path = require('path')
44

55
const config = require('../../config')
@@ -16,5 +16,5 @@ exports.uploadImage = function (imagePath, callback) {
1616
return
1717
}
1818

19-
callback(null, url.URL.resolve(config.serverURL + '/uploads/', path.basename(imagePath)))
19+
callback(null, (new URL(path.basename(imagePath), config.serverURL + '/uploads/')).href)
2020
}

0 commit comments

Comments
 (0)