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
public void DownloadFile(string fileName)
{
string url = mainLink + "files/" + fileName;
string localPath = Path.Combine(DataManager.videosFolder + fileName);
if (!System.IO.File.Exists(localPath))
{
RestClient.Get(new RequestHelper
{
Uri = url,
DownloadHandler = new DownloadHandlerFile(Path.Combine(localPath)),
Timeout = 13,
Retries = 0,
IgnoreHttpException = false
}).Then(response =>
{
if (response.Request.downloadHandler.isDone)
{
Popup.main.DisplayMessage(Popup.Style.Blue, "Completed video download!", false);
}
}).Catch(ErrorHandler);
}
}
On an http exception ErrorHandler is called and code works, but the errored response is downloaded and stored as a file (Cannot GET /files/xx), do I have to delete it every time or am I missing something?
The text was updated successfully, but these errors were encountered:
On an http exception ErrorHandler is called and code works, but the errored response is downloaded and stored as a file (Cannot GET /files/xx), do I have to delete it every time or am I missing something?
The text was updated successfully, but these errors were encountered: