First Try to Upload-file Async

This commit is contained in:
Nicola Carminati
2018-07-31 12:39:19 +02:00
parent 45e5a903ea
commit ce1b6a87cc
5 changed files with 64 additions and 7 deletions
+4 -2
View File
@@ -8,6 +8,7 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using static CMS_CORE_Library.DataStructures;
@@ -79,8 +80,9 @@ namespace Step.Controllers.WebApi
List<string> files = new List<string>();
// Read all contents of multipart message into CustomMultipartFormDataStreamProvider.
var result = await Request.Content.ReadAsMultipartAsync(provider);
var result = await Request.Content.ReadAsMultipartAsync(provider);
Thread.Sleep(5000);
// Send OK Response along with saved file names to the client.
return Ok();
}