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 · 1 comment · May be fixed by #9034
Assignees
Labels
🌈 Feature Request 👨‍🏭 Some one working on this A community member has started working on this

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
@Nicoss54 Nicoss54 self-assigned this Feb 20, 2025
@Nicoss54
Copy link
Collaborator

@HyperLife1119 let me work on it :)

@Laffery Laffery added the 👨‍🏭 Some one working on this A community member has started working on this label Feb 21, 2025
@Nicoss54 Nicoss54 linked a pull request Mar 10, 2025 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌈 Feature Request 👨‍🏭 Some one working on this A community member has started working on this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants