Provide a more sensible suggested filename when downloading traces.
This commit is contained in:
parent
76df341f66
commit
bce2c88336
2 changed files with 27 additions and 1 deletions
|
@ -118,7 +118,7 @@ class TraceController < ApplicationController
|
|||
def data
|
||||
trace = Trace.find(params[:id])
|
||||
if trace and (trace.public? or (@user and @user == trace.user))
|
||||
send_file(trace.trace_name, :filename => "#{trace.id}.gpx", :type => trace.mime_type, :disposition => 'attachment')
|
||||
send_file(trace.trace_name, :filename => "#{trace.id}#{trace.extension_name}", :type => trace.mime_type, :disposition => 'attachment')
|
||||
else
|
||||
render :nothing, :status => :not_found
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue