修复文件名中有单引号无法上传的问题

This commit is contained in:
MoeGrid 2022-04-16 16:51:41 +08:00
parent e2ccae3225
commit e54b4dbe99
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ export default class FileManager {
}
public static checkFileName(fileName: string) {
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"', "'"];
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"'];
for (const ch of blackKeys) {
if (fileName.includes(ch)) return false;
}

View File

@ -20,7 +20,7 @@
*/
export function checkFileName(fileName: string) {
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"', "'"];
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"'];
for (const ch of blackKeys) {
if (fileName.includes(ch)) return false;
}