mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 21:24:05 +00:00
Assign a public id based on the picture name
This commit is contained in:
parent
4c4918a7a7
commit
c876a2d1cf
1 changed files with 4 additions and 0 deletions
|
|
@ -8,6 +8,10 @@ class PictureUploader < CarrierWave::Uploader::Base
|
|||
# use cloudinary if it's configured
|
||||
if Cloudinary.config.cloud_name
|
||||
include Cloudinary::CarrierWave
|
||||
|
||||
def public_id
|
||||
return model.try(:photo_file_name) || model.try(:logo_file_name)
|
||||
end
|
||||
end
|
||||
|
||||
def paperclip_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue