How to validate file content type to pdf, word, excel, and plain text for paperclip?

后端 未结 3 1775
醉话见心
醉话见心 2021-02-05 07:44

In my model:

 has_attached_file :uploaded_file,  
                      :url => \"/policy_documents/get/:id\",  
                      :path => \"/public/p         


        
3条回答
  •  梦如初夏
    2021-02-05 08:29

    For any files if you are uploading, if you don't know the content type of that means, checkout uploading with that document itself, and after this, check in the development log(or terminal) which content_type it is...then change that content_type in your application.

提交回复
热议问题