amazon web services - How to stream S3 object directly from Java web server to browser -


what have tried far

s3object object = s3object.getobject(new getobjectrequest(bucketname,filename)); inputstreamresource inputstreamresource = object.getobjectcontent(); // setting headers. return new responseentity(inputstreamresource,headers, httpstatus.ok); 

but code not streaming date browser. has first downloaded server , sent browser requirement directly stream browser without downloading @ server.

any pseudocode or link help.

thanks

instead of calling getobject(), create signed request , send 302 redirect client. browser retrieve object directly amazon. in case aren't using it, jets3t library makes dealing s3 signatures simpler.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -