[openstreetmap/openstreetmap-website] Compress plain GPX uploads with gzip (PR #7124)

Ruben L. Mendoza notifications at github.com
Mon Jun 22 18:41:19 UTC 2026


@Rub21 commented on this pull request.



> @@ -76,10 +76,33 @@ def tagstring=(s)
   def file=(attachable)
     case attachable
     when ActionDispatch::Http::UploadedFile, Rack::Test::UploadedFile
-      super(:io => attachable,
-            :filename => attachable.original_filename,
-            :content_type => content_type(attachable.path),
-            :identify => false)
+      type = content_type(attachable.path)
+
+      if type == "application/gpx+xml"

Good idea, I've applied it, cleaner and consistent with the controllers that already use Mime[:gpx]

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7124#discussion_r3454646773
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7124/review/4547111000 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260622/bf75f701/attachment.htm>


More information about the rails-dev mailing list