From 556da19d82b651b7a3372c5937f03ad55803ce1b Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Wed, 18 Mar 2020 17:35:21 -0700 Subject: clean up audio --- src/server/DashUploadUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/server') diff --git a/src/server/DashUploadUtils.ts b/src/server/DashUploadUtils.ts index bc5d1d95b..dd99ff746 100644 --- a/src/server/DashUploadUtils.ts +++ b/src/server/DashUploadUtils.ts @@ -193,9 +193,10 @@ export namespace DashUploadUtils { }; }; - export async function MoveParsedFile(file: File, destination: Directory): Promise { + export async function MoveParsedFile(file: File, destination: Directory, suffix: string | undefined = undefined): Promise { const { path: sourcePath } = file; - const name = path.basename(sourcePath); + let name = path.basename(sourcePath); + suffix && (name += suffix); return new Promise(resolve => { const destinationPath = serverPathToFile(destination, name); rename(sourcePath, destinationPath, error => { -- cgit v1.2.3-70-g09d2