我尝试使用上传的文件创建 ReadSteam 并通过管道传输到 WriteStream:
var f2 = req.files.f2;
var f2read = fs.createReadStream(f2)
var f2write = fs.createWriteStream("./trailers/" + id + ".mkv")
f2read.pipe(f2write)
但是出现了这个错误:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of Object