0

我想获取 word 和 pdf 文件的缩略图(文件内容的预览),我正在使用 carrierwave 来处理上传。

我像这样配置上传器:

# encoding: utf-8
require 'carrierwave/processing/mime_types'

class FileUploader < CarrierWave::Uploader::Base

  # Include RMagick or ImageScience support:
  # include CarrierWave::RMagick
  include CarrierWave::MiniMagick
  # include CarrierWave::ImageScience

  include CarrierWave::MimeTypes

  version :m do
    process :resize_to_fill => [75, 75]
  end

  version :b do
    process :resize_to_fill => [125, 125]
  end
  ....

end

但它不能与非图像一起使用

4

0 回答 0