From 11e5c42bc9df777cad75f8758d5450e003af623c Mon Sep 17 00:00:00 2001 From: Mees Frensel <33722705+meesfrensel@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:58:40 +0100 Subject: [PATCH] fix(web): toast warning when trying to upload unsupported file type (#26492) --- i18n/en.json | 1 + web/src/lib/utils/file-uploader.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/i18n/en.json b/i18n/en.json index 440f9beb64..2d77cc3f2f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2307,6 +2307,7 @@ "unstack_action_prompt": "{count} unstacked", "unstacked_assets_count": "Un-stacked {count, plural, one {# asset} other {# assets}}", "unsupported_field_type": "Unsupported field type", + "unsupported_file_type": "File {file} can't be uploaded because its file type {type} is not supported.", "untagged": "Untagged", "untitled_workflow": "Untitled workflow", "up_next": "Up next", diff --git a/web/src/lib/utils/file-uploader.ts b/web/src/lib/utils/file-uploader.ts index e33022eb37..f2a4cdec4f 100644 --- a/web/src/lib/utils/file-uploader.ts +++ b/web/src/lib/utils/file-uploader.ts @@ -15,6 +15,7 @@ import { getBaseUrl, type AssetMediaResponseDto, } from '@immich/sdk'; +import { toastManager } from '@immich/ui'; import { tick } from 'svelte'; import { t } from 'svelte-i18n'; import { get } from 'svelte/store'; @@ -112,6 +113,10 @@ export const fileUploadHandler = async ({ promises.push( uploadExecutionQueue.addTask(() => fileUploader({ assetFile: file, deviceAssetId, albumId, isLockedAssets })), ); + } else { + toastManager.warning(get(t)('unsupported_file_type', { values: { file: file.name, type: file.type } }), { + timeout: 10_000, + }); } }