prasmussen / gdrive

Google Drive CLI Client
MIT License
8.99k stars 1.19k forks source link

An upload-only client #350

Open spierepf opened 7 years ago

spierepf commented 7 years ago

I'm building a doorway video monitor using a webcam and a Raspberry PI. I'm using motion (https://motion-project.github.io/) to capture video and images, and I'd like to use gdrive to upload those images to Google Drive for secure storage.

However, inherent in the gdrive tool is that a person with access to the pi might be able to use the same gdrive to delete images and video that have already be sent to Google Drive.

How difficult would it be to create an upload-only client, either by using a compile-time flag, or as a separate project?

elliott-beach commented 7 years ago

@spierepf This should be possible by altering the permissions token you give to gdrive. If you gave an upload-only token, gdrive couldn't modify files in google drive. This would cause the CLI to fail with non-user-friendly errors when you attempted to do write operations, but it would work to prevent them from occurring.

Code to be modified would be the part that brings up the authentication bag in google when the cli is installed - doesn't sound that difficult!