Trying to find a solution for storing some files from a lil' app I'm currently building, I tried to use a filepicker node module and tried the simplest example I could create:
app.get('/test', function(req, res) {
fs.readFile('myFile.txt', function (err, buf){
filepicker.getUrlFromBuffer(buf, {persist: true}, function (err, url) {
console.log("myfile.txt is now stored at " + url);
});
return res.send('something');
});
I get this error message : "TypeError: Cannot read property 'url' of undefined". But when I check the console on filepicker.io site, I can see that the file has been uploaded.
Here is the github repo I got the filepicker node module from: https://github.com/treygriffith/filepicker/blob/master/README.md
Thank you guys!