Skip to content

nz-upload: No Event Triggered for Unsupported File Formats with nzAccept and nzFileType in Drag-and-Drop and upload file dialog. #8907

@Ludenser

Description

@Ludenser

What problem does this feature solve?

When using the nz-upload component with nzAccept or nzFileType, files that do not match the specified formats are filtered out during drag-and-drop without triggering any event. This prevents developers from handling unsupported formats, as the logic does not reach nzBeforeUpload. An event should be triggered to allow for custom handling of these cases.

What does the proposed API look like?

The nz-upload component should emit an event when files with unsupported formats are dragged and dropped, and also when uploaded via the file dialog in the nzFileType case. This event would allow developers to implement custom logic, such as displaying an error message or logging the attempt. Alternatively, the logic could be adjusted to allow nzBeforeUpload to be called for unsupported files.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions