High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(web): "undefined" in error message when error at uploading (#5973)
RenautMestdaghf7a78618e500
diff --git a/web/src/lib/utils/file-uploader.ts b/web/src/lib/utils/file-uploader.tsindex 2cf8dec652..b61437a12f 100644--- a/web/src/lib/utils/file-uploader.ts+++ b/web/src/lib/utils/file-uploader.ts@@ -127,10 +127,11 @@ function handleUploadError(asset: File, respBody = '{}', extraMessage?: string)try {const res = JSON.parse(respBody);const extraMsg = res ? ' ' + res?.message : '';+ const messageSuffix = extraMessage !== undefined ? ` ${extraMessage}` : '';notificationController.show({type: NotificationType.Error,- message: `Cannot upload file ${asset.name} ${extraMsg}${extraMessage}`,+ message: `Cannot upload file ${asset.name} ${extraMsg}${messageSuffix}`,timeout: 5000,});} catch (e) {