<%= field_wrapper **field_wrapper_args do %> <% if @field.value.present? %>
<%= render Avo::Fields::Common::SingleFileViewerComponent.new resource: @resource, field: @field %>
<% end %> <% if @resource.authorization.authorize_action(:upload_attachments?, raise_exception: false) %> <%= @form.file_field @field.id, accept: @field.accept, data: @field.get_html(:data, view: view, element: :input), direct_upload: @field.direct_upload, disabled: @field.is_readonly?, style: @field.get_html(:style, view: view, element: :input) %> <% end %> <% end %>