mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 11:13:22 +08:00
db4c52ca26
This commit adds handlers for the composer uppy mixin to allow for cancelling individual file uploads, not just all of them at once. This is also combined with better tracking of in progress uploads along with their progress percentage, for UI that needs to be able to display the progress for individual files and also cancel individual files. To use this, a cancel button in the UI should call a function like this: ```javascript cancelSingleUpload(fileId) { this.appEvents.trigger(`${this.eventPrefix}:cancel-upload`, { fileId, }); }, ``` Additionally, the `inProgressUploads` can be shown in the UI. It is an array of objects with the file name, ID, and the progress percentage. We can add more data to this if needed down the line. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |