add simple s3 fields to new library form

This commit is contained in:
James Smith committed 2024-07-04 13:32:03 +01:00
1 parent 15296c1f45
commit fe3bb1dd40
2 files changed
+9 -1

No files matched your search

+4 -1
View File
@@ -73,7 +73,10 @@ class LibrariesController < ApplicationController
private
def library_params
params.require(:library).permit(:path, :name, :notes, :caption, :icon, {tag_regex: []}, :storage_service)
params.require(:library).permit(
:path, :name, :notes, :caption, :icon, {tag_regex: []}, :storage_service,
:s3_endpoint, :s3_bucket, :s3_region, :s3_access_key_id, :s3_secret_access_key
)
end
def get_library
+5
View File
@@ -13,6 +13,11 @@
</div>
<%= text_input_row form, :path, placeholder: translate(".path.placeholder") %>
</div>
<%= text_input_row form, :s3_endpoint %>
<%= text_input_row form, :s3_bucket %>
<%= text_input_row form, :s3_region %>
<%= text_input_row form, :s3_access_key_id %>
<%= text_input_row form, :s3_secret_access_key %>
<% end %>
<%= text_input_row form, :caption, help: t(".caption.help") %>
<%= text_input_row form, :icon, help: t(".icon.help_html"), placeholder: translate(".icon.placeholder") %>