ajustement pour PJ attestation

This commit is contained in:
Benoit Queyron 2024-07-12 18:08:51 +02:00
parent 2a955a0f8c
commit dbacbd8ae2
No known key found for this signature in database
GPG key ID: 9E723480C7317E22
2 changed files with 4 additions and 3 deletions

View file

@ -54,7 +54,7 @@ class Attachment::EditComponent < ApplicationComponent
end end
def destroy_attachment_path def destroy_attachment_path
attachment_path(dossier_id: champ&.dossier_id, stable_id: champ&.stable_id, row_id: champ&.row_id, auto_attach_url: @auto_attach_url, view_as: @view_as) attachment_path(dossier_id: champ&.dossier_id, stable_id: champ&.stable_id, row_id: champ&.row_id, auto_attach_url: @auto_attach_url, view_as: @view_as, direct_upload: @direct_upload)
end end
def attachment_input_class def attachment_input_class

View file

@ -43,8 +43,9 @@ class AttachmentsController < ApplicationController
def attachment_options def attachment_options
{ {
attached_file: @attachment.record.public_send(@attachment.name), attached_file: @attachment.record.public_send(@attachment.name),
auto_attach_url: params[:auto_attach_url], view_as: params[:view_as]&.to_sym,
view_as: params[:view_as]&.to_sym direct_upload: params[:direct_upload] == "true",
auto_attach_url: params[:direct_upload] == "true" ? params[:auto_attach_url] : nil
} }
end end
end end