kotlin S3AsyncClient在放置对象时无法与LocalStack一起工作

vmdwslir  于 2023-03-30  发布在  Kotlin
关注(0)|答案(1)|浏览(138)

当我尝试使用S3AsyncClient将对象放入S3时,我得到Data read has a different checksum than expected

@Test
    fun `verify data read has a different checksum than expected`() {
        val client = S3AsyncClient.builder()
            .credentialsProvider(DefaultCredentialsProvider.create())
            .region(Region.US_EAST_1)
            .endpointOverride(URI.create("http://localhost:4572"))
            .build()
        val data = Flux.fromIterable(listOf(ByteBuffer.wrap("test".toByteArray())))
        client.putObject(
            { it.bucket("test").key("test")},
            AsyncRequestBody.fromPublisher(data),
        ).get()
    }

我注意到https://github.com/localstack/localstack/issues/4597,但它不提供任何分辨率,也没有解决办法。

sauutmhj

sauutmhj1#

你能检查一下数据现在是否可读吗?

相关问题