c#文件上传功能
(1)上传一个或多个
/// <summary>
/// </summary>
/// <param name="id"></param>
/// <param name="files"></param>
/// <returns></returns>
[HttpPost]
[Route("/[controller]/UpLoadImage")]
[RequestSizeLimit(long.MaxValue)]
public async Task<JsonResult> UpLoadImage(List<IFormFile> files)
{
//统计所有文件的大小
long size = files.Sum(f => f.Length);
string filepath = Path.Combine(Directory.GetCurrentDirectory(), @"UploadResources\JSJL_Pic\");
string photoBaseUrl = "http://" + Common.GetLocalIP() + "/UploadResources/JSJL_Pic/";
Console.WriteLine(DateTime.Now.ToString() + ": " + Request.HttpContext.Connection.RemoteIpAddress.ToStri