5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-18 14:02:23 +00:00

fix: solo permitir subir imágenes para web #13009

This commit is contained in:
f 2023-04-10 18:21:33 -03:00
parent aaa4608cf7
commit 2086ade1a7

View file

@ -22,7 +22,7 @@
= file_field(*field_name_for(base, attribute, :path),
**field_options(attribute, metadata, required: (metadata.required && !metadata.path?)),
class: "custom-file-input #{invalid(post, attribute)}",
accept: 'image/*', data: { preview: "#{attribute}-preview" })
accept: ActiveStorage.web_image_content_types.join(','), data: { preview: "#{attribute}-preview" })
= label_tag "#{base}_#{attribute}_path",
post_label_t(attribute, :path, post: post), class: 'custom-file-label'
= render 'posts/attribute_feedback',