Skip to content

Commit

Permalink
Fix bug with aws thumbnail job
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit110 committed Sep 6, 2023
1 parent 1f0301a commit b66bc6b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/jobs/fogged/resources/awsthumbnailjob.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "open-uri"

module Fogged
module Resources
class AWSThumbnailJob < ActiveJob::Base
Expand All @@ -10,7 +8,7 @@ def perform(resource)
Fogged.thumbnail_sizes.each_with_index do |size, index|
Tempfile.open(source_from(resource.url), :binmode => true, :encoding => "ascii-8bit") do |source|
Tempfile.open(["thumbnail", ".png"]) do |t|
source.write(open(resource.url).read)
source.write(URI.parse(resource.url).read)
source.flush

MiniMagick::Tool::Convert.new do |c|
Expand Down

0 comments on commit b66bc6b

Please sign in to comment.