Download Store File using Response (I don't want blob)

%3CLINGO-SUB%20id%3D%22lingo-sub-377295%22%20slang%3D%22en-US%22%3EDownload%20Store%20File%20using%20Response%20(I%20don't%20want%20blob)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-377295%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20do%20download%20file%20using%20Response%20(azure%20store%20file)%2C%20but%20I%20don't%20know%20how.%20Can%20someone%20help%20me%3F%3C%2FP%3E%3CH5%20id%3D%22toc-hId-1090345176%22%20id%3D%22toc-hId-1814222480%22%3ER%3CEM%3Eesponse.Charset%20%3D%20%22UTF-8%22%3B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%2F%2FImportant%20to%20set%20buffer%20to%20false.%20IIS%20will%20download%20entire%20blob%20before%20passing%20it%20on%20to%20user%20if%20this%20is%20not%20set%20to%20false%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EResponse.Buffer%20%3D%20false%3B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EResponse.AddHeader(%22Content-Disposition%22%2C%20%22attachment%3B%20filename%3D%5C%22%22%20%2B%20filename%20%2B%20%22%5C%22%22)%3B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EResponse.AddHeader(%22Content-Length%22%2C%20%22100122334%22)%3B%20%2F%2FSet%20the%20length%20the%20file%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EResponse.ContentType%20%3D%20%22application%2Foctet-stream%22%3B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EResponse.Flush()%3B%3C%2FEM%3E%3C%2FH5%3E%3CP%3E%3CSPAN%3EI%20really%20appreciate%20the%20help.%20Thank%20you!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-377295%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EData%20%2B%20Storage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I'm trying do download file using Response (azure store file), but I don't know how. Can someone help me?

Response.Charset = "UTF-8";
//Important to set buffer to false. IIS will download entire blob before passing it on to user if this is not set to false
Response.Buffer = false;
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
Response.AddHeader("Content-Length", "100122334"); //Set the length the file
Response.ContentType = "application/octet-stream";
Response.Flush();

I really appreciate the help. Thank you!

 

 

0 Replies