[OSM-dev] trace file extension in links to data

Stefan Baebler stefan.baebler at gmail.com
Fri Feb 6 21:26:15 GMT 2009


It is a nice practice to indicate the file type in the url of the
download link to let users know what they are getting before actually
pushing it down their throat.

Filename on the trace detail page often says "somecity.gpx" (as at the
time of upload), download link is simply "data" and the resulting file
is named "123456.gpx.gz" (gzipped later on server?), which makes it a
bit confusing.

has a download link to
my aim is to change that to

and similarly at
has the link:
that should be:

I'm attaching an *UNTESTED* patch for above changes in the rails port.

Going a step further would be to match also the base filename, not just
Eg instead:
link would be
or even just

I couldn't find traces with other extensions (.tar.gz, .zip, .gpx.bz2
...) for additional test cases, but it should be easy by peeking into
database or into folder full of traces. Or having some faith that if it
works for two types it should work for all of them.

Related bug: http://trac.openstreetmap.org/ticket/498 - there the
extension ".gpx" was probably hardcoded into the link.

Can someone please apply the patch into their test rails setup and test
it before committing to svn and pushing it to the main site please?

thank you!

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: extension-in-trace-download-links.patch
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090206/503bbdfa/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090206/503bbdfa/attachment.pgp>

More information about the dev mailing list