From: Tom Hughes Date: Thu, 7 Aug 2008 11:31:42 +0000 (+0000) Subject: Make the location of the GPX traces configurable. X-Git-Tag: live~7708 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6d7e69d4d3ec1a873ab5a6accab4ab3a290e5989 Make the location of the GPX traces configurable. --- diff --git a/app/models/trace.rb b/app/models/trace.rb index a0ec22dee..10e867bad 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -58,18 +58,16 @@ class Trace < ActiveRecord::Base data end - # FIXME change to permanent filestore area def large_picture_name - "/home/osm/icons/#{id}.gif" + "#{GPX_IMAGE_DIR}/#{id}.gif" end - # FIXME change to permanent filestore area def icon_picture_name - "/home/osm/icons/#{id}_icon.gif" + "#{GPX_IMAGE_DIR}/#{id}_icon.gif" end def trace_name - "/home/osm/gpx/#{id}.gpx" + "#{GPX_TRACE_DIR}/#{id}.gpx" end def mime_type diff --git a/config/initializers/gpx.rb b/config/initializers/gpx.rb new file mode 100644 index 000000000..df4c6019c --- /dev/null +++ b/config/initializers/gpx.rb @@ -0,0 +1,5 @@ +# Set location of GPX trace files +GPX_TRACE_DIR = "/home/osm/traces" + +# Set location of GPX image files +GPX_IMAGE_DIR = "/home/osm/images"