Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ludenser opened this issue Dec 3, 2024 · 0 comments

Comments

@Ludenser
Copy link

Ludenser commented Dec 3, 2024

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.

@Ludenser Ludenser changed the title No Event Triggered for Unsupported File Formats with nzAccept and nzFileType in Drag-and-Drop and upload file dialog. [nz-upload] No Event Triggered for Unsupported File Formats with nzAccept and nzFileType in Drag-and-Drop and upload file dialog. Dec 3, 2024
@Ludenser Ludenser changed the title [nz-upload] No Event Triggered for Unsupported File Formats with nzAccept and nzFileType in Drag-and-Drop and upload file dialog. nz-upload: No Event Triggered for Unsupported File Formats with nzAccept and nzFileType in Drag-and-Drop and upload file dialog. Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant