problem description
I used antddesign to write a demo, for uploading a file and found that after the upload was successful, the server also received it, but returned a string of things whether the file name saved by base64, is also the same string. Both Chinese and English file names are uploaded as a string of
related codes
let upload = multer ({dest:"./public/uploads"});
app.use (express.static (". / public"));
app.post ("/ upload", upload.single ("files"), (req, res) = > {
res.send("./uploads/" + req.file.filename)
})
what result do you expect? What is the error message actually seen?
I want to know how to solve this problem and return it to the original filename,. It would be better if you could tell me how it works as an upload component ^ _ ^