Skip to content

Commit

Permalink
4416 - Replace thumbnail when page image is replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNigel23 committed Nov 20, 2024
1 parent a439e62 commit be0c774
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/interactors/page/lib/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ def process_uploaded_file(image_file)
raise StandardError, error_msg
end

File.unlink @page.thumbnail_filename if File.exist?(@page.thumbnail_filename)

filename = "#{Rails.root}/public/images/working/upload/#{@page.id}.jpg"

dirname = File.dirname(filename)
Expand Down

0 comments on commit be0c774

Please sign in to comment.