lib/httpimagestore/s3_service.rb in httpimagestore-0.3.2 vs lib/httpimagestore/s3_service.rb in httpimagestore-0.4.0
- old
+ new
@@ -14,9 +14,12 @@
def put_image(image_path, content_type, data)
@logger.info "Putting image in bucket '#{@bucket.name}': #{image_path}"
file = @bucket.objects.build(image_path)
+
+ file.cache_control = @options[:cache_control] if @options.include?(:cache_control) and not @options[:cache_control].empty?
+
file.content_type = content_type
file.content = data
RetryThis.retry_this(
:times => (@options[:upload_retry_times] or 1),