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