Filepicker.io library for node.js
I literally fired off method calls from filepicker.js in Chrome dev tools, checked my network tab, and copied what I saw in node. Just check the [Filepicker Docs] for details on query params and what you can get out of their API.
node-filepicker methods return promises. They also execute any callbacks that you pass in. So you could get fancy and use both the callbacks and the promises, but that would be ridiculous.
npm install node-filepicker
npm install grunt-cli -g #Install grunt to run testscd myproject/node_modules/node-filepickernpm install #Get dev dependenciesgrunt test #Run tests
filepickerstatinkBlob callbackthenvar metadata = JSONparsemetadata;console.log"It's metadata snitches" metadata;;
filepickerstorepayload filename mimetype query callbackthenvar inkBlob = JSONparseinkBlob;console.log"It's an inkBlob" inkBlob;;
filepickerremoveinkBlob callbackthenconsole.log"Success?" success; // Logs "success";