http - How can I stream a large Azure blob as chunks to clients using web API? -


i have users need able download large zip files using web api endpoints. of these files can on 1gb in size. files stored blobs in azure. loading entire stream not work, multiple users, run out of memory. need somehow send in chunks.

can explain/show me how work using web api? i'm not sure how write this. or perhaps other better suggestions on how go achieving objective in scalable fashion?

here endpoint have:

public async task<ihttpactionresult> getfile(int fileid) {     // todo: somehow stream chunks azure through client's browser... } 

a web browser used initiate request web api. include anchor tag on html page user can click download file:

<a href='localhost/file?fileid=3'>click here download</a> 

you should directly stream blobs via azure storage client library. make webapi call sas uri blob want download , include uri in anchor tab. if uri constructed properly, download start user clicks link. don't have worry memory issues web api content bring streamed directly azure storage.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -