mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-18 22:58:29 +01:00
Fix:Upload API endpoint crashing on invalid request with no files #1473
This commit is contained in:
1 parent
e195eec1c5
commit
8f8d6f81ab
1 file changed
+4
@@ -19,6 +19,10 @@ class MiscController {
|
||||
Logger.warn('User attempted to upload without permission', req.user)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
if (!req.files) {
|
||||
Logger.error('Invalid request, no files')
|
||||
return res.sendStatus(400)
|
||||
}
|
||||
var files = Object.values(req.files)
|
||||
var title = req.body.title
|
||||
var author = req.body.author
|
||||
|
||||
Reference in new issue
Block a user