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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠