LoginSignup
27
26

More than 5 years have passed since last update.

CarrierWaveを使ってファイルアップロード

Posted at
Gemfile
gem 'Carrierwave'
bundle install

日本語のファイル名が____に置き換わってしまうのを防ぐために、以下の記述を追加する。

/config/initializers/carrierwave.rb
CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/

参考

27
26
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
27
26