Come caricare file tramite l'API?

Ecco un esempio in Node.js che qualcuno ha fatto funzionare e che potrebbe essere d’aiuto: