included emdash in doc upload validation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user