alpakka icon indicating copy to clipboard operation
alpakka copied to clipboard

GCS support offers no way to set Content-Encoding header

Open jroper opened this issue 5 months ago • 0 comments

The Content-Encoding header is an important header for GCS, it allows you to upload content which has been gzipped, saving on storage costs, and then when GCS serves the content, it will transcode it as necessary, unzipping if a client doesn't supply an Accept-Encoding: gzip header. See the gcs docs. The problem is, the Alpakka GCS API provides no means to set the Content-Encoding header on an object when uploading. Setting it in the object custom metadata doesn't work, GCS will ignore any Content-Encoding values specified in the custom metadata, it must be set as an HTTP header similar to Content-Type.

I believe there are other metadata headers that can only be supplied as HTTP headers, and not as custom metadata, but I haven't tested those.

jroper avatar Mar 04 '24 23:03 jroper