Open yuyuyoyo opened 2 years ago
I want to upload a file and post it into PHPMyAdmin (database)
Front-end ` const uploader = async() => { var url = 'http://localhost/phpmyadmin/index.php?route=/sql&server=1&db=reactphp&table=perfume&pos=0'; // File upload web service path
var formData = new FormData(); formData.append("file", file); var xhr = new XMLHttpRequest(); xhr.open('POST', url); console.log('OPENED', xhr.status); xhr.onprogress = function () { console.log('LOADING', xhr.status); }; xhr.onload = function () { console.log('DONE', xhr.status); }; xhr.send(formData);
} ` In React
In database
What a problem? Or do I do something in the backend? please help me.
I want to upload a file and post it into PHPMyAdmin (database)
Front-end ` const uploader = async() => { var url = 'http://localhost/phpmyadmin/index.php?route=/sql&server=1&db=reactphp&table=perfume&pos=0'; // File upload web service path
} ` In React
In database
What a problem? Or do I do something in the backend? please help me.