Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why haven't error but file isn't at phpmyadmin #41

Open
yuyuyoyo opened this issue Feb 13, 2022 · 0 comments
Open

why haven't error but file isn't at phpmyadmin #41

yuyuyoyo opened this issue Feb 13, 2022 · 0 comments

Comments

@yuyuyoyo
Copy link

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
image

In database
image

What a problem? Or do I do something in the backend? please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant