only picture uploads
This commit is contained in:
parent
0db45d5834
commit
3cb5e2965d
@ -31,12 +31,10 @@ class PictureUploader < CarrierWave::Uploader::Base
|
||||
# process resize_to_fit: [50, 50]
|
||||
# end
|
||||
|
||||
# Add an allowlist of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
# def extension_allowlist
|
||||
# %w(jpg jpeg gif png)
|
||||
# end
|
||||
|
||||
def content_type_allowlist
|
||||
/image\//
|
||||
end
|
||||
|
||||
# Override the filename of the uploaded files:
|
||||
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
||||
# def filename
|
||||
|
Loading…
Reference in New Issue
Block a user