I have following code that works fine on my localhost running node.js 0.12.0. The code creates a new file, and copy data from readable, but it doesn't create new file on Heroku.
var output = fs.createWriteStream('public/images/test/testfile.png');
readable.pipe(output);
I thought it has something to do with the permission, but whenever I change the permission on the folder using heroku run bash
and then chmod -R 777 images/
Heroku resets it back to its original permission which is drwx------
.
So may be the problem is something else?
Please note that it fails silently, no exception, nothing in the log.