Missing images return images properly now

This commit is contained in:
Christoph Haas 2021-02-13 22:33:02 +01:00
parent 8b6e9b4fdd
commit e9aea5325a

View file

@ -267,11 +267,12 @@ class PackagesController < ApplicationController
# Send a dummy thumbnail reading "No screenshot available. Sorry."
def thumbnail404
redirect_to '/images/dummy/thumbnail404.png', status: 404
send_file Rails.root.join('public/images/dummy/thumbnail404.png'), type: 'image/png', disposition: 'inline', status: 404
end
# Send a dummy screenshot reading "No screenshot available. Sorry."
def screenshot404
redirect_to '/images/dummy/screenshot404.png', status: 404
send_file Rails.root.join('public/images/dummy/screenshot404.png'), type: 'image/png', disposition: 'inline', status: 404
end
# Return packages matching the criteria given by parameters