Google Photos にファイルをアップロード.
Upload photo to Google Photos (Unofficial).
USE AT YOUR OWN RISK
- Turn on "Allowing less secure apps to access your account"
- Setup Google+ account
$ npm install -g upload-gphotos
Download your platform's binary via GitHub Releases.
$ upload-gphotos -u USERNAME -p PASSWORD file [...]
This is also node.js library.
(async () => {
const gphotos = new GPhotos({ username: '', password: '' });
await gphotos.login();
const photo = await gphotos.upload(filePath);
const album = await gphotos.searchOrCreateAlbum('TestAlbum');
await album.addPhoto(photo);
})();
See Documentation.