The readFileMultipart API is unable to read files from an empty directory and errors out with an S3 exception.
Steps to reproduce:
Let's say we have a bucket localbucket has folder called directory but there is no files inside it.
val result =
s3.readFileMultipart(
bucket = BucketName("localbucket"),
key = FileKey("localbucket/directory/"),
partSize = PartSizeMB(25)
)
Output:
Actual:
software.amazon.awssdk.services.s3.model.S3Exception:
The requested range is not satisfiable (Service: S3, Status Code: 416, Request ID: xyz,
Extended Request ID: ...
Expected:
Empty Stream with new Array[Byte](0)
The
readFileMultipartAPI is unable to read files from an empty directory and errors out with an S3 exception.Steps to reproduce:
Let's say we have a bucket
localbuckethas folder calleddirectorybut there is no files inside it.Output:
Actual:
Expected:
Empty Stream with
new Array[Byte](0)