@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)
> Is there a way to test that it's indeed kept in the ActiveStorage metadata?
I added test_keeps_metadata_flag. It uploads with the flag and checks that the
service keeps it
> is send_data(trace.xml_file.read, ...) a dead code path now?
It's not dead. It runs for a server-gzipped trace when the client doesn't
accept gzip, or when the store doesn't serve the header (Disk, or plain S3).
The controller tests already hit it on Disk.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7124#discussion_r3468668732
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