Sunday, 15 April 2012

java - How to send Windows Azure Storage blob to browser with changed header -



java - How to send Windows Azure Storage blob to browser with changed header -

situation: have big set of videos , images , little play applications, stores references blobs in db. web usage that's ok, i'm rendering page, set flowplayer , in it's config i'm using direct blob's path source video. anyway asked additional possibility other older devices - should send file in response body straight headers:

content-type:video/mp4 content-disposition:inline content-transfer-encoding:binary

originally solution done php script, fetched blob server curl , returned response client manipulated header.

question: best way job play? (preferably without downloading file server). blobs public, don't need care hiding original paths, need add together headers mentioned above.

should utilize ws.url() fetch file server , send result modified headers? tried this, had problems ws timeouts. also tried set header content-location:http//mystorage..., anyway understood requires file in response body anyway. maybe there other technique usage of headers only. is there way forcefulness custom headers while returning direct blob (ie. setting in params) ?

maybe quite other approach?

i solved problem approach no. 1, usage of java.net.url instead of ws.url(),

bounty promise actual improve propositions (especially, if done without downloading file server).

java playframework-2.0 windows-azure-storage httpresponse

No comments:

Post a Comment