Initial commit 🍀
This commit is contained in:
commit
b3f42e62af
405 changed files with 31017 additions and 0 deletions
11
src/api/models/drive-file.ts
Normal file
11
src/api/models/drive-file.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export default global.db.collection('drive_files');
|
||||
|
||||
export function validateFileName(name: string): boolean {
|
||||
return (
|
||||
(name.trim().length > 0) &&
|
||||
(name.length <= 200) &&
|
||||
(name.indexOf('\\') === -1) &&
|
||||
(name.indexOf('/') === -1) &&
|
||||
(name.indexOf('..') === -1)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue