Skip to content

Add a byte[]-based uploadFile overload; hide the Iterator<byte[]> chunking as an internal implementation detail #54

Description

@ivannov

Problem

S3Client.uploadFile(String objectKey, String storageClass, Iterator<byte[]> contentIterable, String contentType) is currently the only entry point for binary uploads. This forces any caller that already has the full content buffered as a single byte[] to hand-write a throwaway single-use Iterator<byte[]> just to satisfy the signature.

Solution

Add a public overload:

void uploadFile(String objectKey, String storageClass, byte[] content, String contentType) throws S3ResponseException, IOException;

Internally this wraps content in Bucky's own private single-element Iterator<byte[]> and delegates to the existing multipart-capable method. Callers with an in-memory array never need to implement Iterator themselves: it's an internal detail, not something exposed at the API boundary.

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature EnhancementEnhancing an existing feature driven by business requirements. Typically backwards compatible.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions