regex update to include apostrophe

This commit is contained in:
2026-02-27 09:41:40 +00:00
parent db184984ca
commit 0e9a4da4be
3 changed files with 3 additions and 3 deletions
@@ -1088,7 +1088,7 @@ export const RenderFileUpload = (field) => {
setRejectedFiles([]); // Clear any previously rejected file errorsss
};
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()—]+$/;
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()—']+$/;
const validateFilename = (file, t) => {
const name = file.name;
+1 -1
View File
@@ -2175,7 +2175,7 @@ const RenderFileUpload = (field) => {
setRejectedFiles([]); // Clear any previously rejected file errorsss
};
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()—]+$/;
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()—']+$/;
const validateFilename = (file, t) => {
const name = file.name;
+1 -1
View File
@@ -11,7 +11,7 @@ import { fileTypeFromBuffer } from "file-type";
import fs from "fs";
import path from "path";
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()—]+$/;
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()—']+$/;
function validateFilenameServer(originalFilename) {
const name = path.basename(originalFilename || "");