mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Deprecate uppy-upload-mixin (#29394)
This commit is contained in:
parent
948f5c0140
commit
7d2aea4d69
@ -3,6 +3,7 @@ import { readOnly } from "@ember/object/lib/computed/computed_macros";
|
|||||||
import Mixin from "@ember/object/mixin";
|
import Mixin from "@ember/object/mixin";
|
||||||
import { getOwner } from "@ember/owner";
|
import { getOwner } from "@ember/owner";
|
||||||
import UppyUpload from "discourse/lib/uppy/uppy-upload";
|
import UppyUpload from "discourse/lib/uppy/uppy-upload";
|
||||||
|
import deprecated from "discourse-common/lib/deprecated";
|
||||||
import { deepMerge } from "discourse-common/lib/object";
|
import { deepMerge } from "discourse-common/lib/object";
|
||||||
|
|
||||||
export { HUGE_FILE_THRESHOLD_BYTES } from "discourse/lib/uppy/uppy-upload";
|
export { HUGE_FILE_THRESHOLD_BYTES } from "discourse/lib/uppy/uppy-upload";
|
||||||
@ -36,6 +37,12 @@ export default Mixin.create({
|
|||||||
processing: false,
|
processing: false,
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
deprecated(
|
||||||
|
"The UppyUploadMixin is deprecated. See discourse/lib/uppy/uppy-upload.js for the new implementation.",
|
||||||
|
{
|
||||||
|
id: "discourse.uppy-upload-mixin",
|
||||||
|
}
|
||||||
|
);
|
||||||
this.uppyUpload = new UppyUpload(getOwner(this), configShim(this));
|
this.uppyUpload = new UppyUpload(getOwner(this), configShim(this));
|
||||||
|
|
||||||
this.addObserver("uppyUpload.uploading", () =>
|
this.addObserver("uppyUpload.uploading", () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user