Uploading stream to S3 using Java SDK when content length not known

0

I'm in the process of updating a Java application from the 1.x version of the AWS SDK to the latest 2.x version.

My application contains a function that uploads an InputStream to S3. In the 1.x version of the SDK, the function to do this does not require that I pass in a content length. But in the new version, it apparently does.

Unfortunately, the function in question doesn't have access to the content length and I can't find a way to obtain it.

Is this an intentional change? Is there any way I can upload the stream without knowing the content length? For reasons of security, my application is not allowed to process the stream (write it to a file or read it fully into memory).

Thanks, Frank

  • Hello, have you found a solution to this problem? Thanks.

Frank
已提問 2 年前檢視次數 124 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南