Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios send file

var formData = new FormData();
var imagefile = document.querySelector('#file');
formData.append("image", imagefile.files[0]);
axios.post('upload_file', formData, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #axios #send #file
ADD COMMENT
Topic
Name
4+3 =