Sha256: d5f9a8e2fc975ae0ee12026f7a491f9d5be03bea8760fd3fd1f4eddb9fce793e
Contents?: true
Size: 447 Bytes
Versions: 10
Compression:
Stored size: 447 Bytes
Contents
module Paperclip class HttpUrlProxyAdapter < UriAdapter def self.register Paperclip.io_adapters.register self do |target| String === target && target =~ REGEXP end end REGEXP = /\Ahttps?:\/\//.freeze def initialize(target, options = {}) escaped = Paperclip::UrlGenerator.escape(target) super(URI(target == Paperclip::UrlGenerator.unescape(target) ? escaped : target), options) end end end
Version data entries
10 entries across 10 versions & 1 rubygems