From e1d4de1c22fb6fe86f5c0f5f29da726e31e89728 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 29 Jan 2022 04:48:27 -0600 Subject: [PATCH] uploads: fix double paste bug. Fix a bug where, when pasting an URL directly into the URL field, the URL would be pasted twice, which would cause the upload to fail because the URL was invalid. --- app/components/file_upload_component/file_upload_component.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/file_upload_component/file_upload_component.js b/app/components/file_upload_component/file_upload_component.js index 2f354ba8c..8eba3e490 100644 --- a/app/components/file_upload_component/file_upload_component.js +++ b/app/components/file_upload_component/file_upload_component.js @@ -81,6 +81,8 @@ export default class FileUploadComponent { if (/^https?:\/\//.test(url)) { this.$component.find("input[type='submit']:not([disabled])").click(); } + + e.preventDefault(); } // Called after the upload is submitted via AJAX. Polls the upload until it