Home > Back-end > SSM file upload null pointer exception
SSM file upload null pointer exception
Time:09-27
Very urgent commercial can help to have a look, you really don't understand something wrong
CodePudding user response:
You processData in front-end code: false added
CodePudding user response:
UploadFile function (event) { Var _that=this; //obtain input the content of the Var file=document. QuerySelector (" # fileUpload "). The files [0]
//create the formData object () Var formData=https://bbs.csdn.net/topics/new formData () //add the contents of the input to the formData () object in FormData. Append (" file ", file)
//use jquey ajax to send a post request $. Ajax ({ Url: "/manage/tjBoxShare/import," Type: "POST", ContentType: false, ProcessData: false,//must add Data: formData, Success: the function (res) { The console. The log (res)