0
,這部分我 '/上傳' 路線的行爲在一個非常奇怪的方式:req.pipe(...)不點火在Heroku
console.log("1st point");
var busboy = new Busboy({ headers: req.headers });
busboy.on('field', function(fieldname, file, filename, encoding, mimetype) {
console.log("can never be reached");
});
req.pipe(busboy);
console.log("2nd point");
它從來沒有達到打雜功能和idk爲什麼。
在本地主機和亞馬遜Linux上一切正常,但在heroku上這部分代碼通常只是略過。它讓我瘋狂。謝謝你的幫助。
我不確定這是否因爲Heroku爲dynos設置了文件系統。請參閱https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem,看看它是否有幫助。 –
thx,我在上面。將看看我能否解決它。 – Dima