mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #3010 from overleaf/hb-handle-invalid-filepath-error
Provide specific error on invalid file path upload GitOrigin-RevId: 4b26da398f18fc03e812ea081accd96f05244cef
This commit is contained in:
parent
4e18a81944
commit
2bcbc84e0b
1 changed files with 6 additions and 1 deletions
|
@ -102,7 +102,12 @@ module.exports = ProjectUploadController = {
|
|||
},
|
||||
'error uploading file'
|
||||
)
|
||||
if (error.message === 'project_has_too_many_files') {
|
||||
if (error.name === 'InvalidNameError') {
|
||||
return res.send({
|
||||
success: false,
|
||||
error: req.i18n.translate('invalid_filename')
|
||||
})
|
||||
} else if (error.message === 'project_has_too_many_files') {
|
||||
return res.send({
|
||||
success: false,
|
||||
error: req.i18n.translate('project_has_too_many_files')
|
||||
|
|
Loading…
Reference in a new issue