-
Notifications
You must be signed in to change notification settings - Fork 31
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
putObject does not work when a stream contains multiple chunks #255
Comments
Hello thank you for the report. Can you please provide a test use case to reproduce this error, if you have any. i will look into it |
can you also provide the fullstacktrace |
Here is the test case, it's the same as https://github.com/zio/zio-s3/blob/master/src/test/scala/zio/s3/S3Test.scala#L205 just with testM("put object") {
val c = Chunk.fromArray("Hello F World".getBytes)
val contentLength = c.length.toLong
// chunkN ensures that the stream has multiple chunks
val data = ZStream.fromChunks(c).chunkN(5)
val tmpKey = Random.alphanumeric.take(10).mkString
for {
_ <- putObject(bucketName, tmpKey, contentLength, data)
objectContentLength <- getObjectMetadata(bucketName, tmpKey).map(_.contentLength) <*
ZFiles.delete(root / bucketName / tmpKey)
} yield assert(objectContentLength)(equalTo(contentLength))
}, |
thank you ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It tries to upload every chunk with
putObject
and fails with the following error because the chunk size is not equal to the content length:This seems to be introduced in #251 when
.toPublisher
has been removed. Version 0.3.5 works fine in this regard.The text was updated successfully, but these errors were encountered: