Remove tempfile created by minimagick.
This commit is contained in:
parent
8850d99824
commit
2bbbb4f5af
|
@ -38,6 +38,7 @@ class PageContentsController < OrbitAdminController
|
|||
if image[:height]
|
||||
metas << {"property" => "og:image:height", "content" => image[:height].to_s}
|
||||
end
|
||||
image.destroy! # Remove the tempfile
|
||||
end
|
||||
end
|
||||
else
|
||||
|
@ -59,6 +60,7 @@ class PageContentsController < OrbitAdminController
|
|||
metas << {"property" => "og:image:height", "content" => image[:height].to_s}
|
||||
end
|
||||
image_file.unlink
|
||||
image.destroy! # Remove the tempfile
|
||||
rescue MiniMagick::Invalid => e
|
||||
puts ["src = #{img_src}", e.to_s]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue