Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload file to webdav using a stream #63

Open
unconnected opened this issue Oct 9, 2020 · 4 comments
Open

Upload file to webdav using a stream #63

unconnected opened this issue Oct 9, 2020 · 4 comments

Comments

@unconnected
Copy link

I use your lib for downloading files from a webdav server and works perfectly. I'm using it with the exposed stream that was later added here:

#52

and using it like this:

#31

I can also upload files, but not with progress report, since PutFile doesn't support streams the way GetRawFile() does. Is that something that is possible to add to the lib? Passing a stream to PutFile and then start writing to that stream so that the content is uploaded to the webdav server?

@skazantsev
Copy link
Owner

Hi @unconnected ,

I haven't tried this but I believe it's possible to get upload progress by passing an HttpClient instance with a custom message handler to the WebDavClient.

There's an example of such handler in one of old ASP.NET libs.

It would be nice to support progress of upload/download within the lib but I don't have near future plans to add it.
But I'd be happy to accept Pull Requests for this.

@unconnected
Copy link
Author

I haven't tried this but I believe it's possible to get upload progress by passing an HttpClient instance with a custom message handler to the WebDavClient.

Thanks for the heads up! I'll dive into this :P

@DadOfTheDead
Copy link

I haven't tried this but I believe it's possible to get upload progress by passing an HttpClient instance with a custom message handler to the WebDavClient.

Thanks for the heads up! I'll dive into this :P

Hi @unconnected, did you manage it? Looking for the same!

@DadOfTheDead
Copy link

Hi @unconnected ,

I haven't tried this but I believe it's possible to get upload progress by passing an HttpClient instance with a custom message handler to the WebDavClient.

There's an example of such handler in one of old ASP.NET libs.

It would be nice to support progress of upload/download within the lib but I don't have near future plans to add it. But I'd be happy to accept Pull Requests for this.

For me it worked perfectly using ProgressMessageHandler, thanks!
Can be closed from my perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants