1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-18 00:29:00 +09:00
MisskeyIO/src/api/models/drive-file.ts
syuilo 87d14a9545 ✌️
2017-01-17 09:12:33 +09:00

14 lines
307 B
TypeScript

import db from '../../db/mongodb';
export default 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)
);
}