How to upload a file to google drive?
8,917
Solution 1
There is a good tutorial here.
To summarize the link:
- If not already installed, install
curl
- create Google security certificate
- test from command line
- create Python script to automate
Solution 2
send the file to your gmail account as attachment and from there you can save it to google drive directly.
uuencode file.txt file.txt | mail [email protected]
I know this is not direct to gdrive, but as there is no other options available I use this easy approach.
Related videos on Youtube
Author by
Арсен Мирзаян
Updated on September 18, 2022Comments
-
Арсен Мирзаян over 1 year
I would like to just upload files to google drive from the command line. I don't care about synchronisation. I just want to upload things to google drive and if they exist they get replaced if not they are created.
I know grive exists but that syncs everything from google drive to the folder you use which isn't what I want.
I was wondering if there is a solution to this, through
scp
or something similar?thanks
-
Alex about 10 yearsscp and rsync use ssh. AFAIK Google Drive doesn't offer ssh. rsync can also connect to a rsync daemon, but I doubt Google Drive offers that as well. AFAIK they don't even offer FTP, so probably the only way is creating a script using cURL.
-
Арсен Мирзаян about 10 yearswhich kind of "hacks" it's way through the browser interface?
-
Oki Erie Rinaldi almost 7 yearsyou can check this out github.com/prasmussen/gdrive
-
Oki Erie Rinaldi almost 7 yearsI just do
./gdrive-linux-x64 upload yourfile.rar
. And Thenyourfile.rar
will be uploaded to your gdrive home folder -
brasofilo over 5 yearsThe service Couchdrop.io acts as middleman and is free up to 1GB
-
-
brasofilo over 5 yearsNice trick, pity that's not exactly what's being asked. I need to send a big file and email attachments are restricted to 25MB
-
raj almost 3 yearsNo way that can be called an "easy" approach.