首页 > 代码库 > 转:Warning -26490: File name in a multipart submit is missing or empty.解决方法

转:Warning -26490: File name in a multipart submit is missing or empty.解决方法

录制测试上传文件脚本,回放报Warning -26490: File name in a multipart submit is missing or empty. Using an empty file          [MsgId: MWAR-26490]。

经过几天努力,总算解决了此问题,先看以前的脚本:         web_submit_data("GeneralReport.aspx_2",

         "Action=http://192.168.0.80/pbcmsc/GaiSuan/GeneralReport.aspx?taskid=0e1d66f8-4ecd-42a7-8f9e-e79f6733e992",

                   "Method=POST",

                   "EncType=multipart/form-data",

                   "RecContentType=text/html",

         "Referer=http://192.168.0.80/pbcmsc/GaiSuan/GeneralReport.aspx?taskid=0e1d66f8-4ecd-42a7-8f9e-e79f6733e992",

                   "Snapshot=t11.inf",

                   "Mode=HTML",

                   ITEMDATA,

                   "Name=__EVENTTARGET", "Value="http://www.mamicode.com/, ENDITEM,

                   "Name=__EVENTARGUMENT", "Value="http://www.mamicode.com/, ENDITEM,

                   "Name=__VIEWSTATE", "Value=http://www.mamicode.com/{Siebel_Analytic_ViewState6}", ENDITEM,

                   "Name=__EVENTVALIDATION", "Value=http://www.mamicode.com/wEWBQLi6rucCgKxyJGqCQLgqY6fBALq+76DCwLt3oXMA+v3KRNiiYlPYq+7WLq5K9a+OZs4", ENDITEM,

                   "Name=ddlVersion", "Value=http://www.mamicode.com/送审版", ENDITEM,

                   "Name=txtBelongToPackage", "Value=http://www.mamicode.com/GOOD-3", ENDITEM,

                   "Name=txtDemo", "Value="http://www.mamicode.com/, ENDITEM,

                   "Name=fuPrj", "Value=http://www.mamicode.com/F:""""test1.bwbd5", "File=Yes", ENDITEM,

                   "Name=mu2$multipFile", "Value="http://www.mamicode.com/,"File=Yes", ENDITEM,

                   "Name=btnUpload", "Value=http://www.mamicode.com/上传", ENDITEM,

                   "Name=dxpcCommonWinWS", "Value=http://www.mamicode.com/1:1:12000:237:238:0:0:0", ENDITEM,

                   LAST);

 

         通过了解web_submit_data函数及各参数,发现fuprj和mu2$multipFile都是上传附件的路径。我就想是不是fuprj第一个成功,mu2$multipFile为空是会失败,并报该错,给他赋值一个上传文件(mu2$multipFile的Value= http://www.mamicode.com/F:""""test1.txt),结果二个都上传成功!

转:Warning -26490: File name in a multipart submit is missing or empty.解决方法