cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Organizing your research is important to easily review and share it. Learn how Kim uses Dropbox to gather and organize her research right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Comments

Using CSVhelper with Dropbox - need a stream

Using CSVhelper with Dropbox - need a stream

donaldp
Collaborator | Level 9

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.

1 Accepted Solution

Accepted Solutions

Re: Using CSVhelper with Dropbox - need a stream

Greg-DB
Dropboxer

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.

View solution in original post

2 Replies 2

Re: Using CSVhelper with Dropbox - need a stream

Greg-DB
Dropboxer

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.

Re: Using CSVhelper with Dropbox - need a stream

donaldp
Collaborator | 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.

Who's talking

Top contributors to this post

  • User avatar
    donaldp Collaborator | Level 9
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?