修正文件上传的bug

This commit is contained in:
welefen 2014-07-06 15:25:54 +08:00
parent cf62084c01
commit 700234fe2d

View File

@ -118,7 +118,7 @@ module.exports = Class(function(){
}
//上传的数据中是否含有文件的检测正则
var multiReg = /^multipart\/(form-data|related);\s*boundary=(?:"([^"]+)"|([^;]+))$/i;
if (multiReg.test(this.http.contentType)) {
if (multiReg.test(this.req.headers['content-type'])) {
return this._filePost();
}else{
return this._commonPost();