aboutsummaryrefslogtreecommitdiff
path: root/src/server/DashUploadUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/DashUploadUtils.ts')
-rw-r--r--src/server/DashUploadUtils.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/DashUploadUtils.ts b/src/server/DashUploadUtils.ts
index e94ef8534..8cf657da4 100644
--- a/src/server/DashUploadUtils.ts
+++ b/src/server/DashUploadUtils.ts
@@ -142,6 +142,7 @@ export namespace DashUploadUtils {
const result = await UploadImage(path, basename(path));
return { source: file, result };
}
+ return { source: file, result: { name: 'Unsupported image format', message: `Could not upload unsupported file (${name}). Please convert to an .jpg` } };
case 'video':
if (format.includes('x-matroska')) {
console.log('case video');
@@ -179,6 +180,7 @@ export namespace DashUploadUtils {
if (videoFormats.includes(format)) {
return MoveParsedFile(file, Directory.videos);
}
+ return { source: file, result: { name: 'Unsupported video format', message: `Could not upload unsupported file (${name}). Please convert to an .mp4` } };
case 'application':
if (applicationFormats.includes(format)) {
return UploadPdf(file);
@@ -191,6 +193,7 @@ export namespace DashUploadUtils {
if (audioFormats.includes(format)) {
return UploadAudio(file, format);
}
+ return { source: file, result: { name: 'Unsupported audio format', message: `Could not upload unsupported file (${name}). Please convert to an .mp3` } };
case 'text':
if (types[1] == 'csv') {
return UploadCsv(file);