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
S3: GetObjectRequest toFile option to override file #2300
Labels
Comments
mina-asham
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 26, 2021
Thank you for reaching out @mina-asham. |
mina-asham
added a commit
to mina-asham/aws-sdk-java-v2
that referenced
this issue
Jul 14, 2021
mina-asham
added a commit
to mina-asham/aws-sdk-java-v2
that referenced
this issue
Jul 14, 2021
13 tasks
I have submitted a PR for the suggested fix here: #2595, thanks! |
1 task
12 tasks
aws-sdk-java-automation
added a commit
that referenced
this issue
Dec 21, 2022
…51b6e8f78 Pull request: release <- staging/36a1a3cc-4950-46a7-9607-98551b6e8f78
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Migrating from SDK V1 to V2 we hit an issue where do something like this (pseudo-code):
This allows us to download a temp file, validate it and if we are happy flip it to the actual path overriding the existing previous file.
This works on V1 because: because it just opens an outputstream which by default overwrites (here)
but doesn't work on V2 because we are not passing any options to
Files.copy
(here)Describe the Feature
Allow the use of S3 client to download an object to an existing file by overwriting it
Is your Feature Request related to a problem?
See general summary
Proposed Solution
overwrite
for thistoFile
method here that can be passed to theFiles.copy
call asStandardCopyOption.REPLACE_EXISTING
(only option allowed when usingFiles.copy
with an input stream)ResponseTransformer
, e.g.ResponseTransformer.toFileOverwrite
StandardCopyOption.REPLACE_EXISTING
Describe alternatives you've considered
See suggestion 2/3 in proposed solution
Additional Context
Your Environment
The text was updated successfully, but these errors were encountered: