@pablobm 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)
I think it's good that the flag is not deleted. In the future it might be
useful to have tagged in DB which files used this facility. Is there a way to
test that it's indeed kept in the ActiveStorage metadata? Currently I think the
tests don't complain if there's a `delete` instead of just checking the value
and then using `except` (like you did).
The other thing is: is `send_data(trace.xml_file.read, ...)` a dead code path
now? Is there a circumstance that would use it?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7124#discussion_r3458528241
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/7124/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev