This commit is contained in:
Suwings 2021-02-12 12:05:51 +08:00
commit 99ec5cca64
4 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
//因为这库在旧版本节点上有问题,所以从 github 获取最新版本
//npm i https://github.com/sstur/nodeftpd.git --save
//npm i https://github.com/nodeftpd/nodeftpd.git --save
var ftpdzz = require("ftpd");
var options = null;

View File

@ -157,7 +157,7 @@ router.post("/upload", upload.single("upload_file"), (req, res) => {
if (req.file) {
const originalname = req.file.originalname;
const dstPath = pathm.join(target_path, originalname);
fs.rename(req.file.path, dstPath, (err) => {
fs.move(req.file.path, dstPath, (err) => {
if (err) {
res.status(500).send("上传虽然成功,但是处理文件出错: " + err);
} else {

4
package-lock.json generated
View File

@ -572,8 +572,8 @@
}
},
"ftpd": {
"version": "git+https://github.com/sstur/nodeftpd.git#0d299f78af7f0006a9d5a084614bd8b56a369d1b",
"from": "git+https://github.com/sstur/nodeftpd.git",
"version": "git+https://github.com/nodeftpd/nodeftpd.git#0d299f78af7f0006a9d5a084614bd8b56a369d1b",
"from": "git+https://github.com/nodeftpd/nodeftpd.git",
"requires": {
"dateformat": "1.0.7-1.2.3",
"stat-mode": "^0.2.1"

View File

@ -36,7 +36,7 @@
"express-session": "^1.15.3",
"express-ws": "^4.0.0",
"fs-extra": "^5.0.0",
"ftpd": "git+https://github.com/sstur/nodeftpd.git",
"ftpd": "git+https://github.com/nodeftpd/nodeftpd.git",
"graceful-fs": "^4.1.11",
"iconv-lite": "^0.4.21",
"log4js": "^6.3.0",