mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 01:24:03 +08:00
7911124d3d
This PR adds the first use of Uppy in our codebase, hidden behind a enable_experimental_image_uploader site setting. When the setting is enabled only the user card background uploader will use the new uppy-image-uploader component added in this PR. I've introduced an UppyUpload mixin that has feature parity with the existing Upload mixin, and improves it slightly to deal with multiple/single file distinctions and validations better. For now, this just supports the XHRUpload plugin for uppy, which keeps our existing POST to /uploads.json.
68 lines
1.9 KiB
JavaScript
68 lines
1.9 KiB
JavaScript
// Allow us to import Ember
|
|
define("ember", ["exports"], function (__exports__) {
|
|
// eslint-disable-next-line no-console
|
|
console.warn(
|
|
[
|
|
"Deprecation notice:",
|
|
"Use specific `@ember/*` imports instead of `ember`",
|
|
"(deprecated since Discourse 2.4.0)",
|
|
"(removal in Discourse 2.5.0)",
|
|
].join(" ")
|
|
);
|
|
|
|
__exports__.default = Ember;
|
|
});
|
|
|
|
define("message-bus-client", ["exports"], function (__exports__) {
|
|
__exports__.default = window.MessageBus;
|
|
});
|
|
|
|
define("mousetrap-global-bind", ["exports"], function (__exports__) {
|
|
// In the Rails app it's applied from the vendored file
|
|
__exports__.default = {};
|
|
});
|
|
|
|
define("ember-buffered-proxy/proxy", ["exports"], function (__exports__) {
|
|
__exports__.default = window.BufferedProxy;
|
|
});
|
|
|
|
define("bootbox", ["exports"], function (__exports__) {
|
|
__exports__.default = window.bootbox;
|
|
});
|
|
|
|
define("xss", ["exports"], function (__exports__) {
|
|
__exports__.default = window.filterXSS;
|
|
});
|
|
|
|
define("mousetrap", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Mousetrap;
|
|
});
|
|
|
|
define("@popperjs/core", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Popper;
|
|
__exports__.createPopper = window.Popper.createPopper;
|
|
__exports__.defaultModifiers = window.Popper.defaultModifiers;
|
|
__exports__.popperGenerator = window.Popper.popperGenerator;
|
|
});
|
|
|
|
define("@uppy/core", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Uppy.Core;
|
|
__exports__.Plugin = window.Uppy.Plugin;
|
|
});
|
|
|
|
define("@uppy/aws-s3", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Uppy.AwsS3;
|
|
});
|
|
|
|
define("@uppy/aws-s3-multipart", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Uppy.AwsS3Multipart;
|
|
});
|
|
|
|
define("@uppy/xhr-upload", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Uppy.XHRUpload;
|
|
});
|
|
|
|
define("@uppy/drop-target", ["exports"], function (__exports__) {
|
|
__exports__.default = window.Uppy.DropTarget;
|
|
});
|