Skip to content Skip to sidebar Skip to footer

Using Formdata Object, The Server Receives An Empty Post

I'm attempting to send one file and one text variable to my server with the FormData object. Looking at the Network tab in Chrome's developer tools, I can see that the file and var

Solution 1:

Remove the ajaxHandler.setRequestHeader("Content-type","multipart/form-data"); from the code. The proper multipart/form-data header should contain boundary string. Browser automatically set that header, if you add file in FormData.


Post a Comment for "Using Formdata Object, The Server Receives An Empty Post"