Skip to content

Commit f307469

Browse files
committed
For update_url task, must use the body method to actually retrieve the stream from the S3 GetObjectOutput
1 parent e48857e commit f307469

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tasks/cortex.rake

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ namespace :cortex do
221221
object_key = media.attachment.arbitrary_url_for args[:old_path]
222222

223223
begin
224-
image = s3.get_object({bucket: ENV['S3_BUCKET_NAME'], key: object_key})
224+
image = s3.get_object({bucket: ENV['S3_BUCKET_NAME'], key: object_key}).body
225225
puts "Re-saving image attachment #{media.id} - #{media.attachment_file_name}"
226226
media.attachment = image
227227
media.save

0 commit comments

Comments
 (0)