javascript - How to set boundary while using XmlHttpRequest and FormData -
Using the form data to post the XMLHPRAEVevo, I am trying to set the threshold correctly:
xhr.open ("post", url); Xhr.setRequestHeader ("content-type", "multipart / form-data; limit = ..."); Var formatta = new form data (); FormData.append ("filename", inputId.files [0]); FormData.append (...); Xhr.send (formData); How do I get to set limits in the request title? I was being requested, the border was made in some way in the request. But how can the server be interpreted?
Do not just set the content-type manually header and browser automatically "multipart / form-data; Boundary = ... "value.
If you are using jQuery, set the contentType option to false:
$ Ajax ({url: url, type: 'post', data: form data, process data: wrong, content type: wrong});
Comments
Post a Comment