You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "flokli (via GitHub)" <gi...@apache.org> on 2025/03/20 21:24:37 UTC

[I] object_store: allow setting content-type per request [arrow-rs-object-store]

flokli opened a new issue, #95:
URL: https://github.com/apache/arrow-rs-object-store/issues/95

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   I'd like to use `object_store` to store blobs (and stay somewhat cloud-provider agnostic).
   
   Depending on the size/nature of the blob, I either break it further down, or store it as-is. I need to distinguish these two cases when reading the data back in, and I'd like to use the widely-supported content-type field for this (it's either application/octet-stream, or some index content-type).
   
   The decision of which content-type to use can't be made statically, but needs to happen per request. Which means the existing content-type mechanism (default, or map from extension to content-type) is not sufficient.
   
   **Describe the solution you'd like**
   Add an optional `content_type` field to `PutOptions`. In case it's not `None`, use that content type in favor of any of the existing logic.
   
   Additionally, add an optional `content_type` field to `ObjectMeta`. Most backends already send the content type anyways, so populating it should be quite limited in cost, and no explicit different client config should be necessary.
   
   **Describe alternatives you've considered**
   
   Using custom metadata, as introduced in https://github.com/apache/arrow-rs/pull/4999. This however is distinct from content-type and requires an additional request for some backends (AWS), while content-type is sent inline alongside the data.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org