included emdash in doc upload validation

This commit is contained in:
2026-02-26 13:04:28 +00:00
parent b39ed0fd8c
commit cfe732f299
6 changed files with 131 additions and 126 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
import {
createBlob,
createRepBlob,
uploadSingleFile,
uploadSingleFile
} from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -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 || "");
@@ -51,7 +51,7 @@ ApiProxy.post(async (req, res) => {
"image/jpeg",
"application/zip",
"image/png",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
];
var allowedFilesFormData = {};
@@ -90,7 +90,7 @@ ApiProxy.post(async (req, res) => {
path: file.path,
size: file.size,
headers: file.headers,
contentType: fileMimeType,
contentType: fileMimeType
})
);
} else {
@@ -128,8 +128,8 @@ ApiProxy.post(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;