Skip to content

Commit

Permalink
Bug fixes for dalle export
Browse files Browse the repository at this point in the history
  • Loading branch information
cguess committed Jul 19, 2024
1 parent 795e6d8 commit 913e61f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/tasks/media_review.rake
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,18 @@ namespace :media_review do
media_review.media_authenticity_category_humanized, author_name,
media_review.url]

archive_item.images.each do |image|
archive_item.images.each_with_index do |image, index|
image.image.download do |tempfile|
object = Aws::S3::Object.new(bucket_name, archive_item.id)
object.upload_file(tempfile.path)
rescue Shrine::FileNotFound
# eat it
next
end

csv << ["#{archive_item.id}-#{index}", media_review.media_url, media_review.date_published,
media_review.media_authenticity_category_humanized, author_name,
media_review.url]
end

progress_bar.increment
Expand Down

0 comments on commit 913e61f

Please sign in to comment.