I'm not sure how to use the tmp package of node correctly. Maybe someone can give me an example
Filename generation
It is possible with this library to generate a unique filename in the specified directory.
var tmp = require('tmp');
tmp.tmpName(function _tempNameGenerated(err, path) {
if (err) throw err;
console.log("Created temporary filename: ", path);
});
But what and how do I pass path
. As I understand it, it makes sure, that in my desired directory are just unique filenames. So do I have to pass my for example upload directory as path? (But how syntax wise?)