-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(module:upload): send event when file is not authorize #9034
base: master
Are you sure you want to change the base?
feat(module:upload): send event when file is not authorize #9034
Conversation
This preview will be available after the AzureCI is passed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9034 +/- ##
==========================================
- Coverage 91.96% 91.96% -0.01%
==========================================
Files 559 559
Lines 19772 19800 +28
Branches 2954 3058 +104
==========================================
+ Hits 18184 18209 +25
- Misses 1262 1264 +2
- Partials 326 327 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
696e36e
to
54ea21b
Compare
Can you take a look at this, antd doesn't seem to provide a counterpart either, do we need to add that functionality? |
In fact, the feature does not return the number of files that are not authorized as a result of the filters. This feature may make sense, as the developer may wish to display the list of files that have not been uploaded following the application of filters. |
I just lookup and found there is a related issue with antd ant-design/ant-design#36318, but there are no associated resolution or plan yet. |
I agree. As far as getting files that don't meet the rules, I guess that could be accomplished with nzBeforeUpload? |
Agree too, let's wait the implementation in andt design, keep this PR with putting the tag blocked by andt and the rework if it's needed. NzbeforeUpload is call for each file to upload, if we send an eventEmitter in this part, event emitter will be emit more than 1 time. I had in mind to send an event with all file not accepted. Like this if user upload a directory or multiple file, he will received just one event with a list of file that not match criteria filters |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When file doest not respect the criteria filter like accept, or fileType, no event emitter is sent. This behavior prevent the developer to do something with the file rejected, like display a notification
Issue Number: 8907
What is the new behavior?
When file doest not respect the criteria filter like accept, or fileType, an event emitter is sent
Does this PR introduce a breaking change?
Other information