Remove tempfile created by minimagick.

This commit is contained in:
邱博亞 2025-05-20 23:26:21 +08:00
parent f5796fa8c1
commit 8467fd9e51
2 changed files with 2 additions and 0 deletions

View File

@ -760,6 +760,7 @@ class AnnouncementsController < ApplicationController
if image[:height]
metas << {"property" => "og:image:height", "content" => image[:height].to_s}
end
image.destroy! # Remove the tempfile
end
end
OrbitHelper.render_meta_tags(metas)

View File

@ -416,6 +416,7 @@ class Bulletin
if image
a["image"]["width"] = image[:width]
a["image"]["height"] = image[:height]
image.destroy! # Remove the tempfile
end
end
a["tags"] = []