Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
donaldp
7 years agoCollaborator | Level 9
Using CSVhelper with Dropbox - need a stream
Hi. I'm currently wanting to use https://github.com/JoshClose/CsvHelper with a Dropbox CSV file, but it takes a stream. I'm looking around but can't find anything about getting a stream (I've been using DownloadAsync to date to get files, and yet for some reason my searches aren't even bringing up the doco for that for me to refer back to!).
So from the examples, I need to change this line -
using (var reader = new StreamReader("path\\to\\file.csv"))to something like -
using (var reader=dropboxClient.Files.SomeDropboxAPIforFileStreams("MyDropboxFile.csv"))Can you point me in the right direction here for whatever SomeDropboxAPIforFileStreams would be? Or some other way to achieve that?
thanks,
Donald.
It sounds like you're referring to using the Dropbox API v2 .NET SDK. The documentation for the DownloadAsync method can be found here.
That does offer the ability to access the requested file data as a stream from DownloadAsync. On the resulting IDownloadResponse, use the GetContentAsStreamAsync method.
2 Replies
Replies have been turned off for this discussion
- Greg-DB7 years ago
Dropbox Community Moderator
It sounds like you're referring to using the Dropbox API v2 .NET SDK. The documentation for the DownloadAsync method can be found here.
That does offer the ability to access the requested file data as a stream from DownloadAsync. On the resulting IDownloadResponse, use the GetContentAsStreamAsync method.
- donaldp7 years agoCollaborator | Level 9
Thanks Greg. Oddly, I just tried the search again, and this time the doco showed up! Not sure why it wasn't appearing yesterday. Anyway, thanks again.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!