Browse Source

fix: upload hierarchy error

pull/861/head
Nick 6 years ago
parent
commit
eedd1c0707
1 changed files with 1 additions and 1 deletions
  1. 2
      server/controllers/upload.js

2
server/controllers/upload.js

@ -74,7 +74,7 @@ router.post('/u', multer({
}
// Check if user can upload at path
const assetPath = (folderId) ? opts.hierarchy.map(h => h.slug).join('/') + `/${fileMeta.originalname}` : fileMeta.originalname
const assetPath = (folderId) ? hierarchy.map(h => h.slug).join('/') + `/${fileMeta.originalname}` : fileMeta.originalname
if (!WIKI.auth.checkAccess(req.user, ['write:assets'], { path: assetPath })) {
return res.status(403).json({
succeeded: false,

Loading…
Cancel
Save