Custom thumbnails for file types with Paperclip

后端 未结 2 864
有刺的猬
有刺的猬 2021-02-01 08:41

I\'m using Paperclip with a Ruby on Rails to attach assets to a model, these assets can be any file type and currently thumbnails are only being generated if the asset is an ima

2条回答
  •  忘掉有多难
    2021-02-01 09:23

    You could have some file types inherit from your Asset, e.g. Video and specify a different:

    has_attached_file :media, ..., :style => {....}

    Have a look at this tutorial for video thumbnails.

提交回复
热议问题