mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 07:06:25 -08:00
allow periods in custom ids
This commit is contained in:
parent
3ef9eeaf4c
commit
9d0e06f67e
|
@ -61,7 +61,7 @@ let uploadFile = (settings:FileUploadSettings,fBuffer:Buffer) => {
|
|||
|
||||
let uploadId = (settings.uploadId || Math.random().toString().slice(2)).toString();
|
||||
|
||||
if ((uploadId.match(/[A-Za-z0-9_\-]+/)||[])[0] != uploadId || uploadId.length > 30) {reject({status:400,message:"invalid id"});return}
|
||||
if ((uploadId.match(/[A-Za-z0-9_\-\.]+/)||[])[0] != uploadId || uploadId.length > 30) {reject({status:400,message:"invalid id"});return}
|
||||
|
||||
if (files[uploadId]) {reject({status:400,message:"a file with this id already exists"});return}
|
||||
if (settings.name.length > 128) {reject({status:400,message:"name too long"}); return}
|
||||
|
|
Loading…
Reference in a new issue