Drop redundant support for legacy trace files

This commit is contained in:
Tom Hughes 2024-03-28 17:27:28 +00:00
parent 91143a5959
commit 6059ed0d92
2 changed files with 2 additions and 12 deletions

View file

@ -9,12 +9,7 @@ module Traces
trace = Trace.visible.imported.find(params[:trace_id])
if trace.public? || (current_user && current_user == trace.user)
if trace.icon.attached?
redirect_to rails_blob_path(trace.icon, :disposition => "inline")
else
expires_in 7.days, :private => !trace.public?, :public => trace.public?
send_file(trace.icon_picture_name, :filename => "#{trace.id}_icon.gif", :type => "image/gif", :disposition => "inline")
end
redirect_to rails_blob_path(trace.icon, :disposition => "inline")
else
head :forbidden
end

View file

@ -9,12 +9,7 @@ module Traces
trace = Trace.visible.imported.find(params[:trace_id])
if trace.public? || (current_user && current_user == trace.user)
if trace.icon.attached?
redirect_to rails_blob_path(trace.image, :disposition => "inline")
else
expires_in 7.days, :private => !trace.public?, :public => trace.public?
send_file(trace.large_picture_name, :filename => "#{trace.id}.gif", :type => "image/gif", :disposition => "inline")
end
redirect_to rails_blob_path(trace.image, :disposition => "inline")
else
head :forbidden
end