mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-30 18:48:55 +01:00
Fix:Upload API endpoint crashing on invalid request with no files #1473
This commit is contained in:
parent
e195eec1c5
commit
8f8d6f81ab
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user