diff --git a/app/views/admin/communication/website/posts/show.html.erb b/app/views/admin/communication/website/posts/show.html.erb index 62ab8733071f7d8a1722f2193fae92b28d8ef3fe..4b39d1f823e9a53ddbe20b54b546bf162092eb0e 100644 --- a/app/views/admin/communication/website/posts/show.html.erb +++ b/app/views/admin/communication/website/posts/show.html.erb @@ -54,6 +54,8 @@ </div> <div class="card-body"> <%= image_tag @post.featured_image.variant(resize: '400'), class: 'img-fluid' %> + <%= @post.featured_image.url %> + <%= @post.featured_image.variant(resize: '400').url %> </div> </div> <% end %> diff --git a/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb b/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb index 32d0b6cef07e61e1482759660b315009334da0d6..b0e613863d58d910f854e42d60740a45d499624b 100644 --- a/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb +++ b/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb @@ -1,4 +1,4 @@ <div class="alert alert-danger" role="alert"> <%= t('devise.two_factor_authentication.max_login_attempts_reached').html_safe %> </div> -<%= link_to t('devise.shared.links.sign_out'), destroy_user_session_path, class: "btn btn-danger" %> +<%= link_to t('devise.shared.links.sign_out'), destroy_user_session_path, method: :delete, class: "btn btn-danger" %> diff --git a/config/storage.yml b/config/storage.yml index 66f3ff1fac2a9e91eb39d96180e07e79e8179d47..6b5af23d90bcd79093889204a7ccc5b736f0f837 100644 --- a/config/storage.yml +++ b/config/storage.yml @@ -7,7 +7,7 @@ local: root: <%= Rails.root.join("storage") %> scaleway: - service: S3 + service: Scaleway access_key_id: <%= ENV['SCALEWAY_OS_ACCESS_KEY_ID'] %> secret_access_key: <%= ENV['SCALEWAY_OS_SECRET_ACCESS_KEY'] %> region: <%= ENV['SCALEWAY_OS_REGION'] %> diff --git a/lib/active_storage/service/scaleway_service.rb b/lib/active_storage/service/scaleway_service.rb new file mode 100644 index 0000000000000000000000000000000000000000..1caadf6684ee04990171c97a802f657223b8c97b --- /dev/null +++ b/lib/active_storage/service/scaleway_service.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'active_storage/service/s3_service.rb' + +module ActiveStorage + class Service::ScalewayService < Service::S3Service + + def headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, **) + content_disposition = content_disposition_with(type: disposition, filename: filename) if filename + + headers = public? ? { "x-amz-acl" => "public-read" } : {} + + headers.merge({ "Content-Type" => content_type, "Content-MD5" => checksum, "Content-Disposition" => content_disposition }) + end + end +end