ajax - Facilitate downloading partial blob from azure with javascript -
i uploading azure storage collection of files, single "entity". have requirement provide collection option download each individual file separately, or bundled zip of files. i'd files served directly azure if possible.
firstly, there few alternate undesirable options i've considered:
- upload of individual files azure separate blobs, plus upload separate zip file containing of them. undesirable, duplicate files in azure storage, minimal server load (only needs upload files twice, files served strictly azure)
- upload them separate file, , have them pass through external server bundle them, or vice versa. undesirable, uses server bandwidth , cpu cycles every time, potentially slower serving bundle depending on server load
ideally, i'd upload them pre-packaged zip, include custom blob deflate header (to hint browser these files served compressed), , in metadata specify starting offset , compressed length of each file. if there way specify range header in parameter perfect, image emit html like:
<img src="azure.endpoint/container/somecollection.zip?range=256-542"/>
256-542 binary location of image within zip, , chrome take care of downloading, decompressing, , displaying image - unfortunately i've found no api azure.
it seems alternative use ajax calls, specifying range
header, using kind of javascript deflate library, , loading base64 data-uris. questions follows:
- where can started such thing ajax , javascript? played around getting pako work deflate, i've not been able working in browser after many failed attempts.
- what performance considerations if loading lots of large images this, 20 images of 20mb's each?
- would void browser caching takes place , there considerations there?
- is there alternative option i've overlooked provided requirements?
Comments
Post a Comment