From 09d6c602be077e0eaca2162855486af9c9261f4f Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 29 Jan 2022 04:49:43 -0600 Subject: [PATCH] uploads: fix long filenames not word-wrapping. Fix a bug where, when uploading a file from disk, if the filename was too long, it wouldn't get word-wrapped and could break out of the containing element. --- .../file_upload_component/file_upload_component.html.erb | 8 ++++---- app/javascript/src/styles/common/utilities.scss | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/components/file_upload_component/file_upload_component.html.erb b/app/components/file_upload_component/file_upload_component.html.erb index 7f124b57a..83305ead9 100644 --- a/app/components/file_upload_component/file_upload_component.html.erb +++ b/app/components/file_upload_component/file_upload_component.html.erb @@ -2,8 +2,8 @@ <%= simple_form_for(Upload.new, url: uploads_path(format: :json), html: { class: "flex flex-col", autocomplete: "off" }, remote: true) do |f| %> <%= f.input :file, as: :file, wrapper_html: { class: "hidden" } %> -
-
+
+
Choose file or drag image here
Max size: <%= number_to_human_size(Danbooru.config.max_file_size) %>.
@@ -19,11 +19,11 @@ <% end %>