尝试使用 express 将大文件上传到节点 js 实例,但会因大文件而失败。带有以下错误消息:
Error: Request aborted
at IncomingMessage.<anonymous> (/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js:107:19)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at abortIncoming (http.js:1892:11)
at Socket.serverSocketCloseListener (http.js:1904:5)
at Socket.EventEmitter.emit (events.js:117:20)
at TCP.close (net.js:466:12)
/server/upload/
buffer.js:194
this.parent = new SlowBuffer(this.length);
^
RangeError: length > kMaxLength
at new Buffer (buffer.js:194:21)
at fs.js:220:16
at Object.oncomplete (fs.js:107:15)
31 Jul 14:01:04 - [nodemon] app crashed - waiting for file changes before starting...
当我不想分块数据时,我能做些什么来防止这个错误?
希望有人可以帮助解决;-)