But looking at your code, if the name and fileURL are stored in the file, why have separate variables for them?
And it’s bad practice in JS to label simple functions with PascalCase - they should be camelCase - unless they are classes, object constructors, or React classes.
Is this from some app? Does it work there? From where is this handler being invoked?
The whole front end works well with the back end unless I added to its URL.
I supposed react will give the event handled file URL.
But it doesn’t show any log file.
Where did you get the idea that you could get the file url? From what I can see in the docs, that is not one of the available options. When I log out the file in the app (as I asked you to do) I see the following properties:
It makes sense from a security perspective that you won’t get a map to the inner workings of the users hard drive.
Why do you need the url? You shouldn’t need it for anything - I assume the response itself is a reference to that file, if opaque. The MDN page given shows how to use that.
Right, I haven’t done this, but I assume that that File object can get that and there is a way to upload it. It just won’t tell you exactly where it is in the folder structure of the user’s computer. But I assume that that reference can be used to upload that file to your server.