首页 > Windows开发 > 详细

httpPostedFile实现WEBAPI文件上传

时间:2019-09-18 18:15:16      阅读:292      评论:0      收藏:0      [点我收藏+]
        public void PostUpload()
        {
            var httpPostedFile = HttpContext.Current.Request.Files;
            foreach(string p in httpPostedFile)
            {
                var file = httpPostedFile[p];
                file.SaveAs(HttpContext.Current.Server.MapPath("/test.jpg"));
            }
        }

 

httpPostedFile实现WEBAPI文件上传

原文:https://www.cnblogs.com/superfeeling/p/11544224.html

(2)
(2)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!