only picture uploads

This commit is contained in:
Torsten 2023-06-18 16:22:08 +03:00
parent 0db45d5834
commit 3cb5e2965d

View File

@ -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