0
에서 대상 경로에 저장되지 않습니다 난 그냥 업로드하고, 나는 그 후 나는
Error: EXDEV, rename 'c:\Users\abdul\AppData\Local\Temp\3348-qiy7kl.jpg'
의이 유형을 얻고,
req.files
에 의해 파일의 상세 정보를 얻고 내
public/images
폴더에 이미지를 저장하려고
여기
는 stuff
app.post('/upload',function(req,res){
var tmp_path = req.files.file.path;
var target_path = './public/images/' + req.files.file.originalFilename;
fs.rename(tmp_path, target_path, function(err) {
if (err) throw err;
fs.unlink(tmp_path, function() {
if (err) throw err;
res.send('File uploaded to: ' + target_path + ' - ' + req.files.file.size + ' bytes');
});
});
})
};
어떤 몸이 어떤 제안을 제공하거나 내가 처리 할 수 있도록 나에게 어떤 참조를 줄 수 내입니까?
헤이 @Ali 덕분에, 시도 – abdulbarik