DEV: Deprecate uppy-upload-mixin (#29394)

This commit is contained in:
David Taylor 2024-10-24 20:47:25 +01:00 committed by GitHub
parent 948f5c0140
commit 7d2aea4d69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@ import { readOnly } from "@ember/object/lib/computed/computed_macros";
import Mixin from "@ember/object/mixin";
import { getOwner } from "@ember/owner";
import UppyUpload from "discourse/lib/uppy/uppy-upload";
import deprecated from "discourse-common/lib/deprecated";
import { deepMerge } from "discourse-common/lib/object";
export { HUGE_FILE_THRESHOLD_BYTES } from "discourse/lib/uppy/uppy-upload";
@ -36,6 +37,12 @@ export default Mixin.create({
processing: false,
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.addObserver("uppyUpload.uploading", () =>