1             foreach (var file in Request.Files)
 2                     {
 3                         var pathSrc = System.Web.HttpContext.Current.Server.MapPath("~/Upload/" + dt + "." + file.Name.Split('.')[1]);
 4                         using (FileStream fs = new FileStream(pathSrc, FileMode.Create))
 5                         {
 6                             file.Value.CopyTo(fs);
 7                         }
 8 
 9                         return Response.AsJson(new { img = "http://" + Request.Url.HostName + "/Upload/" + dt + "." + file.Name.Split('.')[1] });
10                     }

 

相关文章:

  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2021-10-10
猜你喜欢
  • 2021-08-26
  • 2021-11-03
  • 2022-12-23
  • 2021-12-13
  • 2021-11-27
  • 2021-08-20
  • 2022-12-23
相关资源
相似解决方案