KoenZomers / OneDriveAPI

API in .NET Framework 4.8.0, .NET Core 3.1 and .NET 6.0 to communicate with OneDrive Personal and OneDrive for Business
Eclipse Public License 1.0
109 stars 34 forks source link

Create Method DownloadItem(Stream stream) #1

Closed Kyrodan closed 8 years ago

Kyrodan commented 8 years ago

The methods "DownloadItem" always save to a local file. In many situations it's better to download to a stream (Parameter stream) and handle subsequent operations from "outside" (the method caller side).

Kyrodan commented 8 years ago

Same for UploadItem.

Kyrodan commented 8 years ago

Maybe these overloaded "Shortcut-Methods" should be moved to to Extension Methods. Only basic methods should be left in the API-Class.

KoenZomers commented 8 years ago

Good point. I've added a new method which returns a stream with the OneDrive contents. For backwards compatibility and because I do believe that saving the contents to disk is core functionality, I will leave the current methods in place.