//string file path = file upload 1。文件名;//獲取上傳的文件名20022775_m.jpg
字符串filename = filepath。子字符串(文件路徑。LastIndexOf(" \ \ "+1);//20022775_m.jpg
字符串serverpath = Server。MapPath(" ~/images/")+filename;//獲取文件在服務器上的保存位置c:\ inetpub \ wwwroot \ website 1 \ images \ 20022775 _ m.jpg。
FileUpload1。posted file . save as(server path);//將上傳的文件另存為。
string strsj = " curl-F media = @ "+server path;
string sc = " curl-form upload = @ "+server path+"-form press = OK["+strurl+"]";
string str JSON = post webrequest(sc,"",編碼。UTF8);
這個。上傳信息。Text = strJson
我就是這麽寫的。妳可以改變它。