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
preguntada hace 2 años124 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas