[openstreetmap/openstreetmap-website] Compress plain GPX uploads with gzip (PR #7124)
Ruben L. Mendoza
notifications at github.com
Mon Jun 22 19:05:23 UTC 2026
@Rub21 commented on this pull request.
> @@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+module GpxDownloadMethods
+ extend ActiveSupport::Concern
+
+ private
+
+ # Send the stored trace file to the client. It can go back two ways.
+ # - If the store serves gzip (S3) and the client accepts it, redirect and let the client unzip it.
+ # - Otherwise the server unzips it first and sends plain GPX.
+ def send_trace_file(trace)
+ if gzipped_by_server?(trace)
Good catch, The flag was being removed by our own delete in the service, which mutated the metadata. I changed it so it isn't removed, the flag stays now.
We still need the method though, xml_file uses the same flag to decompress the .gpx/.xml downloads.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7124#discussion_r3454790582
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7124/review/4547314595 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260622/823712d1/attachment-0001.htm>
More information about the rails-dev
mailing list