]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces/pictures_controller.rb
Merge branch 'pull/5206'
[rails.git] / app / controllers / traces / pictures_controller.rb
index e190621674df094aabc4bca32c1c6ac1d5ec16c0..0b26ed8847f37d0507de5d1870e67331119e8525 100644 (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