I am trying to implement ng-flow https://github.com/flowjs/ng-flow for file upload. It upload files in chunk, I successfully set this on client but I am not sure ho
Here's the ASP.NET Web API controller that I've come up with to save the chunks and assemble them.
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net;
using System.Net.Http;
using System.IO;
using System.Web;
using System.Web.Http;
namespace Api.Controllers
{
[RoutePrefix("api")]
public class FlowUploadController : ApiController
{
string root = Path.Combine(Path.GetTempPath(), "FlowUpload");
[Route("flowupload"), AcceptVerbs("GET")]
public object Upload(
int flowChunkNumber,
string flowIdentifier)
{
if (ChunkIsHere(flowChunkNumber, flowIdentifier))
{
return Request.CreateResponse(HttpStatusCode.OK);
}
else
{
return Request.CreateResponse(HttpStatusCode.NotFound);
}
}
[Route("flowupload"), AcceptVerbs("POST")]
public async Task