Esempio n. 1
0
 /// <summary>
 /// Upload replay
 /// </summary>
 /// <param name="file">Path to file</param>
 /// <returns>Upload result</returns>
 public override async Task <UploadStatus> Upload(string file)
 {
     try
     {
         return(await _restApi.UploadReplay(file));
     }
     catch (WebException ex)
     {
         if (await CheckApiThrottling(ex.Response))
         {
             return(await Upload(file));
         }
         _log.Warn(ex, $"Error uploading file '{file}'");
         return(UploadStatus.UploadError);
     }
 }