Google Photos にファイルをアップロード.
Upload photo to Google Photos (Unofficial).
USE AT YOUR OWN RISK
- Turn on "Allowing less secure apps to access your account"
$ npm install -g upload-gphotos
Download your platform's binary via GitHub Releases.
$ upload-gphotos file [...] -u USERNAME -p PASSWORD
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.