DropboxRestAPI icon indicating copy to clipboard operation
DropboxRestAPI copied to clipboard

Metadata Method: Files(string path,stream filestream)

Open ghost opened this issue 9 years ago • 1 comments

I have been trying to call this method - Files(path, filestream). Following the example from the documentation. Everything else works, file upload, create folder, delete file, delete folder, even getting the list of files and folder in the dropbox account.

However this specific call, following the exact example throws this error: "object reference not set to an instance of an object"

When I debug inside the restapi code. I realize the Stream has an Error Exception Message: "timeouts are not supported on this stream"

in this specific line of code it fails in the Metadata : IMetadata class.

 public  MetaData Files(string path, Stream targetStream, string rev = null, string asTeamMember =     null, CancellationToken cancellationToken = default(CancellationToken))
    {
        MetaData fileMetadata = null;
        using (var restResponse =  _requestExecuter.Execute(() => _requestGenerator.Files(_options.Root, path, rev, asTeamMember), cancellationToken: cancellationToken))
        {  ...

ghost avatar Sep 14 '15 17:09 ghost

How are you calling the method? Are you providing a valid target stream? Do you provide a rev? asTeamMember?

saguiitay avatar Sep 15 '15 06:09 saguiitay