ITADN

Add option for setting ACL for uploads

#427Closeduckelman 创建于 2025-06-14
enhancement
U
uckelmancommented
The `Bucket::put_object_*` functions lack a way of setting ACLs for the uploaded object. It's possible to do it by setting extra headers for the `Bucket`, but that causes those extra headers to be sent for all requests, not just when uploading objects. It would be nice if these functions had an argument for setting ACLs. (Maybe as part of a general options struct, since setting content type is also an optional thing?) I happen to need to make what I'm uploading publicly readable, so as a workaround did this: ```rust bucket.with_extra_headers( HeaderMap::from_iter([( HeaderName::from_static("x-amz-acl"), HeaderValue::from_static("public-read") )]) )? ``` This isn't so hard, but wasn't easy to discover. If support for setting ACLs per-put can't be added, it would be helpful if how to set ACLs globally were mentioned in the documentation.
关闭于 2026-05-04 1 条评论