diff --git a/src/components/upload/PhotoUpload.tsx b/src/components/upload/PhotoUpload.tsx index db3e6584..786afc6c 100644 --- a/src/components/upload/PhotoUpload.tsx +++ b/src/components/upload/PhotoUpload.tsx @@ -165,6 +165,12 @@ export function PhotoUpload({ const filesToUpload = isAvatar ? Array.from(files).slice(0, 1) : Array.from(files).slice(0, actualMaxFiles - totalImages); + if (filesToUpload.length === 0) { + setError('No files to upload'); + onError?.('No files to upload'); + return; + } + // Validate all files first for (const file of filesToUpload) { const validationError = validateFile(file);