上传表单xmlhttprequest时出错

时间:2015-10-30 17:08:52

标签: jquery coldfusion

如果我使用以下javascript,

var uploadForm = new FormData();
uploadForm.append("theFile", files[i]);
uploadForm.append("fileName", files[i].name);
var httpReq = new XMLHttpRequest();
httpReq.open("post", "handleUpload.cfm", true);
httpReq.send(uploadForm);

HandleUpload看起来像这样:

        <cffile  action="upload" 

         destination="uploadedFiles/" 

         accept="image/jpeg, application/pdf, image/png, image/gif" 

         nameconflict="makeunique"

         filefield="theFile" 
    />

为什么它会给我“尝试阅读图像时发生异常。”在我相应的cffile页面上?

0 个答案:

没有答案