Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use slices for multipart chunk data #351

Open
dustinlagoy opened this issue Jun 8, 2023 · 1 comment
Open

Use slices for multipart chunk data #351

dustinlagoy opened this issue Jun 8, 2023 · 1 comment
Assignees

Comments

@dustinlagoy
Copy link

Is your feature request related to a problem? Please describe.
When uploading large amounts of data I would like to avoid as many copies as possible. put_multipart_chunk currently requires moving a Vec<u8> as the input chunk which may require copying the chunk if it must be used elsewhere. Also this is different from put_object which uses &[u8] as the input.

Describe the solution you'd like
I would like put_multipart_chunk to accept a &[u8] slice as its input.

Describe alternatives you've considered
Refactoring my application to copy data or perform the put as the last step could work but seems unnecessary.

Additional context
Both put_multipart_chunk and put_object end up calling Command::PutObject with a slice and my cursory look at the source I didn't see any obvious reason moving was required for the putting chunks.

If this is something desired I would be happy to put a PR together.

@garikello3d
Copy link

hey @dustinlagoy , why don't you submit the PR if you already have it? I believe it's super useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants