[Vuejs]-Vue: V-input-file is not of type ‘HTMLFormElement’ error

0👍

Based on your last comment, i created a codepen to check the issue.

  1. There is no HTMLFormElement error which i encountered, check below code pen
    https://codepen.io/kurtesy_/pen/MWJBwQX?editors=1111

  2. Next to Post a formData using axios use the below protocol, you need to specify "Content-Type": "multipart/form-data"

    axios({
       method: "post",
       url: "your_url",
       data: formData,
       headers: { "Content-Type": "multipart/form-data" },
     })
       .then(function (response) {
         //handle success
         console.log(response);
       })
       .catch(function (response) {
         //handle error
         console.log(response);
       });
    

Leave a comment