chore: revision to overwriteExistingFields

This commit is contained in:
James
2021-09-22 13:23:25 -04:00
parent dbbff4cfa4
commit df36a6e7e6
3 changed files with 6 additions and 4 deletions

View File

@@ -137,7 +137,7 @@ async function update(incomingArgs: Arguments): Promise<Document> {
const file = ((req.files && req.files.file) ? req.files.file : req.file) as UploadedFile;
if (file) {
const fsSafeName = overwriteExistingFiles ? await getSafeFilename(staticPath, file.name) : file.name;
const fsSafeName = !overwriteExistingFiles ? await getSafeFilename(staticPath, file.name) : file.name;
try {
if (!disableLocalStorage) {