I have created a web API to save the files from form multipart data.
API Code :-
string videoFileName = string.Empty;
var httpRequest = System.Web.HttpContext.Current.Request;
if (httpRequest.Files.Count > 0)
{
string projectpath = System.Web.HttpContext.Current.Server.MapPath("Images");
Int32 projectpathLength = projectpath.Length - 10;
string actualpath = projectpath.Substring(0, projectpathLength);
string uploadPath = actualpath + "Images/TeamManager/Team_" + videoData.Team_Id + "/Videos/";
bool exists = System.IO.Directory.Exists(uploadPath);
if (!exists)
System.IO.Directory.CreateDirectory(uploadPath);
videoFileName = UploadFile(httpRequest.Files, uploadPath);
...
Go to the complete details ...