igorkasyanchuk/active_storage_validations

[Validator/Helper] Add validator & helper method to facilitate microsoft documents to content_type validator

Aperta

#316 aperta il 5 dic 2024

 (0 commenti) (0 reazioni) (0 assegnatari)Ruby (148 fork)github user discovery
enhancementgood first issue

Metriche repository

Star
 (1179 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

We could add a shorthand for msword, msexcel, msppt documents in our content_type validator. This shorthand could also be made available to the views to alleviate the effort of writing something like:

<%= form.file_field :document, accept: ".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document" %>

Guida contributor