lib/carrierwave/aliyun/bucket.rb in carrierwave-aliyun-1.1.2 vs lib/carrierwave/aliyun/bucket.rb in carrierwave-aliyun-1.1.3
- old
+ new
@@ -130,12 +130,14 @@
# 有效期 15 minutes
def private_get_url(path, thumb: nil)
path = path.sub(PATH_PREFIX, "")
url = if thumb
- img_client.object_url([path, thumb].join(""), expiry: 15.minutes)
+ thumb = thumb.gsub('?', '')
+ parameters = Hash[*thumb.split('=')]
+ img_client.object_url(path, true, 15.minutes, parameters)
else
- oss_client.object_url(path, expiry: 15.minutes)
+ oss_client.object_url(path, true, 15.minutes)
end
url.sub("http://", "https://")
end