Closed
Description
@csarven @michielbdejong @jeff-zucker
Doing tests with solid-rest we found that header location return path and I was expecting url.
What is the good content from spec viewpoint.
in https://github.com/solid/node-solid-server/blob/master/lib/handlers/post.js
function one () {
debug('Receving one file')
const { slug, link, 'content-type': contentType } = req.headers
const links = header.parseMetadataFromHeader(link)
const mimeType = contentType ? contentType.replace(/\s*;.*/, '') : ''
const extension = mimeType in extensions ? `.${extensions[mimeType][0]}` : ''
ldp.post(req.hostname, containerPath, req,
{ slug, extension, container: links.isBasicContainer, contentType }).then(
resourcePath => {
debug('File stored in ' + resourcePath)
header.addLinks(res, links)
res.set('Location', resourcePath)
res.sendStatus(201)
next()
},
err => next(err))
}
Metadata
Metadata
Assignees
Labels
No labels