Sha256: 5bc13231512a935383a12898ebcd50ab6d7b9a4e6d640033f83f9d6bd0beb551
Contents?: true
Size: 759 Bytes
Versions: 1
Compression:
Stored size: 759 Bytes
Contents
module Cloudinary::CarrierWave def download!(uri, *args) return super if !self.cloudinary_should_handle_remote? if respond_to?(:process_uri) uri = process_uri(uri) else # Backward compatibility with old CarrierWave uri = URI.parse(Utils.smart_escape(Utils.smart_unescape(uri))) end return if uri.to_s.blank? self.original_filename = @cache_id = @filename = File.basename(uri.path).gsub(/[^a-zA-Z0-9\.\-\+_]/, '') @file = RemoteFile.new(uri, @filename) end class RemoteFile attr_reader :uri, :original_filename def initialize(uri, filename) @uri = uri @original_filename = filename end def delete # Do nothing. This is a virtual file. end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cloudinary-1.14.0 | lib/cloudinary/carrier_wave/remote.rb |