OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/uploaders/fog_file_uploader.rb

23 lines
368 B

class FogFileUploader < CarrierWave::Uploader::Base
include FileUploader
storage :fog
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
def remote_file
@remote_file || file
end
def local_file
@remote_file ||= file
cache_stored_file!
super
end
def download_url
remote_file.url
end
end