mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 15:10:48 +02:00
nullcheck qqfile on upload files
This commit is contained in:
@@ -27,8 +27,8 @@ module.exports = ProjectUploadController =
|
||||
|
||||
uploadFile: (req, res, next) ->
|
||||
timer = new metrics.Timer("file-upload")
|
||||
name = req.files.qqfile.originalname
|
||||
path = req.files.qqfile.path
|
||||
name = req.files.qqfile?.originalname
|
||||
path = req.files.qqfile?.path
|
||||
project_id = req.params.Project_id
|
||||
folder_id = req.query.folder_id
|
||||
if !name? or name.length == 0 or name.length > 150
|
||||
|
||||
Reference in New Issue
Block a user