Error: EXDEV: cross-device link not permitted, rename nodejs
problem is with rename method. use 'mv' package to move your file
https://www.npmjs.com/package/mv
Thanks. Used 'mv' package instead of filesystem 'rename' method to solve the error occurred in moving the file to another folder during file upload:
"Error: EXDEV: cross-device link not permitted, rename..."
Installed package 'mv' using cmd:
npm install mv
Usage:
var mv = require('mv');
mv('source/file', 'dest/file', function(err) {
....
....
});