You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It shouldn't be a requirement to download a file to a local path. There should be the capability of downloading the file to any writable stream.
The best (in my opion) way to handle this would be creating a download method that returns the response stream that correlates to the file. EG, if using a Http Client, returning response.Content.ReadAsStreamAsync() might be an option.
The text was updated successfully, but these errors were encountered:
The direct stream along with the streams progress (IProgress) can be access using the "DownloadAsync" method in root of the client object. Here is an example:
This doesn't quite achieve my objective in the end. UItimately, I wanted to start the download request but not actually download any part of the file, because it was just to check if the file existed. In the end, i just ended up implementing a manual HTTP Head request to check the status code (looking for a successful status code to indicate the file existed).
Got it. I have a better understanding of what you are trying to do. You can download the status/results of a file by passing "null" in the stream. This will automatically handle passing a head request HttpCompletionOption.ResponseHeadersRead and will not download any content. Here is an example:
It shouldn't be a requirement to download a file to a local path. There should be the capability of downloading the file to any writable stream.
The best (in my opion) way to handle this would be creating a download method that returns the response stream that correlates to the file. EG, if using a Http Client, returning
response.Content.ReadAsStreamAsync()
might be an option.The text was updated successfully, but these errors were encountered: