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

Ruben L. Mendoza notifications at github.com
Fri Jun 12 16:17:45 UTC 2026


Rub21 left a comment (openstreetmap/openstreetmap-website#7124)

> I seem to remember there was a way to have S3 store gzipped files and serve them as Content-Encoding: gzip, which could be a solution here. Quick lookup yields https://stackoverflow.com/a/15117310

Good point, I looked at the Content-Encoding on S3 idea, but ActiveStorage's [upload method](https://github.com/rails/rails/blob/v8.1.3/activestorage/lib/active_storage/service/s3_service.rb#L29-L40) can not set that header on the file. It can set content_type and some [custom metadata](https://github.com/rails/rails/blob/v8.1.3/activestorage/lib/active_storage/service/s3_service.rb#L182-L183) and usea a prefix: `x-amz-meta-* `, but not Content-Encoding. To do it we would need  to implement our own S3 code,   we can implement that in other PR. 




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

Message ID: <openstreetmap/openstreetmap-website/pull/7124/c4693074737 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260612/6d723ca4/attachment-0001.htm>


More information about the rails-dev mailing list