标签: ruby-on-rails carrierwave
如何根据文件格式对文件执行各种操作?
答案 0 :(得分:1)
https://github.com/jnicklas/carrierwave/wiki/How-to:-Do-conditional-processing
您还可以查看file.extension(请参阅sanitized_file.rb)
file.extension