mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 07:33:37 +08:00
49c49e8ae0
This takes the uppy chunking algorithm and combines it with some form submission from resumable.js for parity with the current backup controller to make local backup uploads work with uppy. We can then use this to replace the resumable-upload component and the resumable.js library from our codebase, once stable. This is disabled by default, so people using local backups will not be affected. The enable_experimental_backup_uploader site setting must be enabled for this to work.
17 lines
730 B
JavaScript
17 lines
730 B
JavaScript
// We need a custom build of Uppy because we do not use webpack for
|
|
// our JS modules/build. The only way to get what you want from Uppy
|
|
// is to use the webpack modules or to include the entire Uppy project
|
|
// including all plugins in a single JS file. This way we can just
|
|
// use the plugins we actually want.
|
|
window.Uppy = {}
|
|
Uppy.Core = require('@uppy/core')
|
|
Uppy.XHRUpload = require('@uppy/xhr-upload')
|
|
Uppy.AwsS3 = require('@uppy/aws-s3')
|
|
Uppy.AwsS3Multipart = require('@uppy/aws-s3-multipart')
|
|
Uppy.DropTarget = require('@uppy/drop-target')
|
|
Uppy.Utils = {
|
|
delay: require('@uppy/utils/lib/delay'),
|
|
EventTracker: require('@uppy/utils/lib/EventTracker'),
|
|
AbortControllerLib: require('@uppy/utils/lib/AbortController')
|
|
}
|