http - Azure blob file download link -


i have blob i've stored in azure blob storage (using development emulator).

its saved , can see in server explorer in blob store (file.mp3 if matters).

i'm linking in site when click link i'm getting 206 (partial content) (and no file). if right click save happy , file downloads.

enter image description here

i'm sure pretty noobish i'm missing cant see it.

that because, browser not download media file whole, browser requests range blob storage correctly responds 1 byte , headers. called http streaming, parts of file downloaded in ranges , played progressively. in form of streaming can skip parts of file , go end play end part of media without downloading whole file.

imagine watching big movie, , movie of 100 mb. , want watch last 1 minute of it, can move player's tracker forward on timeline , browser download last few megabytes per timeline structure in media file. mp4 & similar media containers support file byte position tracking.

browsers & media players try stream media file if possible.

you can try following download attribute, reference: http://updates.html5rocks.com/2011/08/downloading-resources-in-html5-a-download

<a href="http://www.google.com/.../logo2w.png" download="mygooglelogo">download me</a> 

you can try following code, answer, reference: chrome extension: how save file on disk

var url = window.webkiturl || window.url || window.mozurl || window.msurl; var = document.createelement('a'); a.download = 'myhangouts-momentcapture.jpg'; a.href = url.createobjecturl(datauritoblob(data.active, 'jpg')); a.textcontent = 'click here download!'; a.dataset.downloadurl = ['jpg', a.download, a.href].join(':');   /**  * converts data image uri blob.  *  * @param {string} datauri base64 data image uri.  * @param {string} mimetype image mimetype.  */ var datauritoblob = function(datauri, mimetype) {   var base64_marker = ';base64,';   var base64index = datauri.indexof(base64_marker) + base64_marker.length;   var base64 = datauri.substring(base64index);   var raw = window.atob(base64);   var rawlength = raw.length;   var uint8array = new uint8array(rawlength);    (var = 0; < rawlength; ++i) {     uint8array[i] = raw.charcodeat(i);   }    var bb = new this.blobbuilder();   bb.append(uint8array.buffer);   return bb.getblob(mimetype); }; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -