Downloading files from Dropbox using C# asp.net -


i want download files dropbox using dropbox.api.

my current code is

public static void download(listbox file)     {         file.items.clear();         using (var dbx = new dropboxclient("mytoken"))         {             using (var responses = dbx.files.downloadasync("/pakistan.txt"))                   {            httpcontext.current.response.clear();            httpcontext.current.response.clearheaders();            httpcontext.current.response.clearcontent();            httpcontext.current.response.addheader("content-disposition", attachment; filename=" + responses.result.response.name);            httpcontext.current.response.addheader("content-length", responses.result.response.size.tostring());            httpcontext.current.response.contenttype = "text/plain";            httpcontext.current.response.flush();            httpcontext.current.response.transmitfile(responses.result.response.name);            httpcontext.current.response.end();             }         }     } 

it's downloading file, contents not present in file.


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -