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
feita há 2 anos124 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas