これは動作するはずです。
var client = sdk.getAppAuthClient('enterprise', ENTERPRISE_ID);
//filter_term == admin to share the folder with
client.enterprise.getUsers({filter_term: '[email protected]'}, function(err, users) {
var userId = users.entries[0].id;
client.folders.create('0', 'New Folder', function(err, newFolder) {
client.collaborations.createWithUserID(userId, newFolder.id, client.collaborationRoles.VIEWER, function(err, collaboration) {
console.log(err);
var fileData = fs.createReadStream('/users/kdomen/Downloads/test.txt')
client.files.uploadFile(newFolder.id, 'test.txt', fileData, function(err, file) {
if (err){
console.log('err: ' + err);
}
else{
console.log('file uploaded: ' + file);
}
});
});
});
});
ありがとうございました。私は明日にそれを試して報告します。 – t33n
あなたは私の主人公の犬です!私が見たところでは、アップロードの進捗状況からの追跡はサポートされていませんでした。 googledriveのように、req.connection.bytesWrittenを例として作成することができます。それともあなたが知っている方法がありますか?あなたはonedrive APIで作業しましたか? – t33n
私はこれを行う方法がわかりません。ごめんなさい! – kendomen