Skip to content

Instantly share code, notes, and snippets.

View analistacarlosh's full-sized avatar
😀

Carlos Rodrigues analistacarlosh

😀
View GitHub Profile
@tanaikech
tanaikech / submit.md
Last active August 2, 2024 22:07
Uploading Files to OneDrive Using Node.js

In order to use this script, please retrieve client id, client secret and refresh token before. About this, you can see the detail information at https://gist.github.com/tanaikech/d9674f0ead7e3320c5e3184f5d1b05cc.

1. Simple item upload

This is for the simple item upload is available for items with less than 4 MB of content. The detail information is https://dev.onedrive.com/items/upload_put.htm.

var fs = require('fs');
var mime = require('mime');
var request = require('request');