fixing large file upload errors by srtting time out to 1 hour: #15 · 83a2c1163b - SVN.BY: Go Git Service
Browse Source

fixing large file upload errors by srtting time out to 1 hour: #15

Tiernan OToole 8 years ago
parent
commit
83a2c1163b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      B2Uploader/Program.cs

+ 4 - 0
B2Uploader/Program.cs

@@ -264,6 +264,10 @@ namespace B2Uploader
264 264
         static async Task<string> MakeRequest2(string url, List<Tuple<string, string>> headers, string data, bool isFile = false, string contentType = "application/json; charset=utf-8")
265 265
         {
266 266
             var client = new HttpClient();
267
+            if (isFile)
268
+            {
269
+                client.Timeout = TimeSpan.FromMinutes(60);
270
+            }
267 271
            
268 272
             foreach (var head in headers)
269 273
             {