mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
Uploader changes based on https://github.com/carrierwaveuploader/carrierwave
This commit is contained in:
parent
ed22b62551
commit
9f84454a8d
2 changed files with 3 additions and 2 deletions
|
|
@ -1313,6 +1313,7 @@ Style/RegexpLiteral:
|
|||
Exclude:
|
||||
- 'Guardfile'
|
||||
- 'config/initializers/airbrake.rb'
|
||||
- 'app/uploaders/picture_uploader.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ class PictureUploader < CarrierWave::Uploader::Base
|
|||
|
||||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
def extension_whitelist
|
||||
%w(jpg jpeg gif png)
|
||||
end
|
||||
|
||||
def content_type_whitelist
|
||||
%r{/image\//}
|
||||
/image\//
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue