From 8173c73aa31ec718c81cd823ee76f7a567530397 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 3 Feb 2022 17:22:52 -0600 Subject: [PATCH] uploads: fix back button re-uploading the file when using bookmarklet. Fix a bug where, if you used the bookmarklet to upload a file, and you clicked on the back button on the upload tagging page, then you would be taken back to the upload page, which would autosubmit the upload again. Now if you click the back button on the upload tagging page, you'll be taken back to the page where you used the bookmarklet, not the upload page. --- app/components/file_upload_component/file_upload_component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/file_upload_component/file_upload_component.js b/app/components/file_upload_component/file_upload_component.js index 2bb99c3af..c6f2901ab 100644 --- a/app/components/file_upload_component/file_upload_component.js +++ b/app/components/file_upload_component/file_upload_component.js @@ -102,7 +102,7 @@ export default class FileUploadComponent { } if (upload.status === "completed") { - location.href = `/uploads/${upload.id}`; + window.location.replace(`/uploads/${upload.id}`); } else { this.$dropzone.removeClass("success"); this.$component.find("progress").addClass("hidden");