-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@uppy/core: improve performance of validating & uploading files (#4402)
* show how many files are added when loading remake of #4388 * add french (cherry pick) * implement concurrent file listing * refactor / fix lint * refactor/reduce duplication * pull out totals validation don't do it for every file added, as it's very slow instead do the check at the end when all files are added. this allows us to easily work with 10k+ files fixes #4389 * Update packages/@uppy/core/src/Uppy.js Co-authored-by: Antoine du Hamel <[email protected]> * make restricter.validate validate everything instead make more specific methods for sub-validation also rename validateTotals to validateAggregateRestrictions * improve errors and user feedback - handle errors centrally so that we can limit the amount of toasts (informers) sent to the users (prevent flooding hundreds/thousands of them) - introduce FileRestrictionError which is a restriction error for a specific file - introduce isUserFacing field for RestrictionError * fix performance issue reintroduced * improvements - show "%{count} additional restrictions were not fulfilled" for any restriction errors more than 4 - refactor/rename methods - improve ghost logic/comments * improve performance when uploading - introduce new event "upload-start" that can contain multiple files - make a new patchFilesState method to allow updating more files - unify "upload-start" logic in all plugins (send it before files start uploading) - defer slicing buffer until we need the data - refactor to reuse code * fix e2e build issue * try to upgrade cypress maybe it fixes the error * Revert "fix e2e build issue" This reverts commit ff3e580. * upgrade parcel * move mutation logic to end * remove FileRestrictionError merge it with RestrictionError * fix silly bug looks like the e2e tests are doing its job 👏 --------- Co-authored-by: Antoine du Hamel <[email protected]>
- Loading branch information
Showing
21 changed files
with
1,766 additions
and
853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.