POST form data using Axios API in JavaScript (including a file) YouTube
Nodejs Axios Post Form Data. Const axios = require ('axios').default; Const form = new formdata();
Const axios = require ('axios').default; Const form = new formdata(); Web you can post axios data by using formdata () like: Var bodydata = new formdata (); Web working code is: Const formdata = new formdata ();. Var bodyformdata = new formdata (); And then add the fields to the form you want to send: Append ('my_file', await filefrompath ('/foo/bar.jpg')); Const fs = require ('fs');
Const form = new formdata(); Const formdata = new formdata ();. Var bodyformdata = new formdata (); Const fs = require ('fs'); Web you can post axios data by using formdata () like: Web working code is: Const axios = require ('axios').default; And then add the fields to the form you want to send: Append ('my_file', await filefrompath ('/foo/bar.jpg')); Const form = new formdata(); Var bodydata = new formdata ();