-
Notifications
You must be signed in to change notification settings - Fork 313
[BUG] S3DBService fails to handle existing files during download #5898
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When downloading the databases from S3, the download will fail if the current file exists as it is not able to overwrite the file. The method which causes this issue is S3DBService.buildRequestAndDownloadFile. Currently this method uses Files.copy from the java.nio.file.Files package which does not allow overwrites.
The solution would be to use the ResponseTransformer.toFile(path) method like this:
S3Client.getObject((b) -> { b.bucket(bucketName).key(key);}, ResponseTransformer.toFile(destination));
Expected behavior
The S3DBService is able to overwrite the file if the file already exists
Environment (please complete the following information):
- OS: Linux
- Version 2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done