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/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev