rust-s3 icon indicating copy to clipboard operation
rust-s3 copied to clipboard

Add put_object_with_headers method to bucket

Open yoozzeek opened this issue 5 months ago • 0 comments
trafficstars

Add two new methods to support uploading objects with custom HTTP headers on a per-request basis:

  • put_object_with_content_type_and_headers: upload with explicit content-type and custom headers.
  • put_object_with_headers: uploads an object with optional custom headers; uses "application/octet-stream" as the default Content-Type.

Custom headers are attached to the PUT request via the headers method in the request trait. Following the same design approach as the existing put_object and put_object_with_content_type methods.

Use Case: Enable per-upload customization of HTTP headers such as Cache-Control, allowing control over caching.


This change is Reviewable

yoozzeek avatar May 22 '25 09:05 yoozzeek