We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9f662d commit 4a6babfCopy full SHA for 4a6babf
1 file changed
lib/handlers/post.js
@@ -56,8 +56,8 @@ async function handler (req, res, next) {
56
const busboy = new Busboy({ headers: req.headers })
57
busboy.on('file', async function (fieldname, file, filename, encoding, mimetype) {
58
debug('One file received via multipart: ' + filename)
59
- const filePath = ldp.resourceMapper._rootPath + path.join(containerPath, filename)
60
- const { url: putUrl } = await ldp.resourceMapper.mapFileToUrl({ path: filePath, hostname: req.hostname })
+ const { url: putUrl } = await ldp.resourceMapper.mapFileToUrl(
+ { path: ldp.resourceMapper._rootPath + path.join(containerPath, filename), hostname: req.hostname })
61
try {
62
await ldp.put(putUrl, file, mimetype)
63
} catch (err) {
0 commit comments