diff --git a/app/javascript/shared/activestorage/uploader.js b/app/javascript/shared/activestorage/uploader.js index 1d1dcce8b..2c1c081de 100644 --- a/app/javascript/shared/activestorage/uploader.js +++ b/app/javascript/shared/activestorage/uploader.js @@ -30,11 +30,12 @@ export default class Uploader { if (this.autoAttachUrl) { await this._attach(blobSignedId); + // On response, the attachment HTML fragment will replace the progress bar. + } else { + this.progressBar.end(); + this.progressBar.destroy(); } - this.progressBar.end(); - this.progressBar.destroy(); - return blobSignedId; } catch (error) { this.progressBar.error(error.message);