What I want to achieve is when the user press choosefile and chooses an image file, js would save the image file in the directory and use it.
Thanks in advance :)
here is my HTML:
<Upload onChange={this.onChangeUrl}> <Button> <UploadOutlined /> Click to Upload </Button> </Upload> <Button onClick={this.onSubmit}> Add Card</Button>
Here is the error I get:
xhr.js:178 POST http://localhost:3000/add 404 (Not Found)
createError.js:16 Uncaught (in promise) Error: Request failed
with status code 404
at createError (createError.js:16)
at settle (settle.js:17)
at XMLHttpRequest.handleLoad (xhr.js:61)
Is there a post request that I should implement?