Upload file won’t send to backend with Ajax

category:  jQuery, Web development

Sometimes you create a form by containing the file input field(such as upload image file) and other text input fields. And you want to send all form data to the backend using Ajax. But you find out the only the file input data won’t send to the backend. Why? You may send the form data using serialize(). This is the cause that your backend won’t get the file input data via Ajax. Here is the code snippet using serialize(). $(“body”).on(“beforeSubmit”, … Read More