Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

uploading form data using axios to back end server such as node js

axios({
  method: "post",
  url: "myurl",
  data: bodyFormData,
  headers: { "Content-Type": "multipart/form-data" },
})
  .then(function (response) {
    //handle success
    console.log(response);
  })
  .catch(function (response) {
    //handle error
    console.log(response);
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #uploading #form #data #axios #server #node #js
ADD COMMENT
Topic
Name
3+7 =