System.Net.WebClient wc = new System.Net.WebClient();
wc.Headers.Add("Content-Type", "image/jpeg");
byte[] resData = wc.UploadFile(netWorkPath + fileInfo.Name, filePath);
wc.Headers.Add("Content-Type", "image/jpeg");
byte[] resData = wc.UploadFile(netWorkPath + fileInfo.Name, filePath);
本文介绍如何使用System.Net.WebClient类将文件上传到指定的网络路径,并设置请求头为Content-Type为image/jpeg。
4483

被折叠的 条评论
为什么被折叠?



