Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Improve uppy plugin base and large file handling
We want to be able to skip plugins from doing any work under certain conditions, and to be able raise their own errors if a file being uploaded is completely incompatible with the concept of the plugin if it is enabled. For example, the UppyChecksum plugin is happy to skip hashing large files, but the UppyUploadEncrypt plugin from discourse-encrypt relies on the file being encrypted to do anything with the upload, so it is considered a blocking error if the user uploads a file that is too large. This improves the base functions available in uppy-plugin-base and extendable-uploader to handle this, as well as introducing a HUGE_FILE_THRESHOLD_BYTES variable which represents 100MB in bytes, matching the ExternalUploadManager::DOWNLOAD_LIMIT on the server side. discourse-encrypt to take advantage of this new functionality will follow in discourse/discourse-encrypt#141
- Loading branch information
1 parent
37a3bf9
commit 44144a3
Showing
7 changed files
with
108 additions
and
27 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
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