[Cyberduck-trac] [Cyberduck] #10201: CLI Google Drive --existing file management

Cyberduck trac at cyberduck.io
Sat Feb 17 19:42:10 UTC 2018


#10201: CLI Google Drive --existing file management
------------------------------+------------------------
 Reporter:  togno             |         Owner:  dkocher
     Type:  defect            |        Status:  closed
 Priority:  normal            |     Milestone:  6.4.0
Component:  googledrive       |       Version:  6.3.4
 Severity:  normal            |    Resolution:  fixed
 Keywords:  googledrive; CLI  |  Architecture:
 Platform:  macOS 10.12       |
------------------------------+------------------------

Comment (by dkocher):

 * Using `skip` option
 {{{
 mellifera:~ dkocher$ duck --existing skip --upload
 googledrive://drive.google.com/My%20Drive/ ~/Desktop/test.png -v
 Authenticating as dkocher…
 > POST /o/oauth2/token HTTP/1.1
 > Accept-Encoding: gzip
 > User-Agent: Google-HTTP-Java-Client/1.24.0-SNAPSHOT (gzip)
 > Content-Length: 196
 > Content-Type: application/x-www-form-urlencoded; charset=UTF-8
 > Host: accounts.google.com
 > Connection: Keep-Alive
 < HTTP/1.1 200 OK
 < Content-Type: application/json; charset=utf-8
 < X-Content-Type-Options: nosniff
 < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 < Pragma: no-cache
 < Expires: Mon, 01 Jan 1990 00:00:00 GMT
 < Date: Sat, 17 Feb 2018 19:38:39 GMT
 < Content-Disposition: attachment; filename="json.txt";
 filename*=UTF-8''json.txt
 < Content-Encoding: gzip
 < Server: ESF
 < X-XSS-Protection: 1; mode=block
 < X-Frame-Options: SAMEORIGIN
 < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339;
 quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000;
 v="41,39,38,37,35"
 Login successful…
 > GET
 /drive/v3/files?fields=files(createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink),nextPageToken&includeTeamDriveItems=true&orderBy=name&pageSize=1000&q='root'%20in%20parents&supportsTeamDrives=true
 HTTP/1.1
 > Accept-Encoding: gzip
 > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64) Google-
 API-Java-Client
 > Host: www.googleapis.com
 > Connection: Keep-Alive
 > Authorization: ********
 < HTTP/1.1 200 OK
 < Expires: Sat, 17 Feb 2018 19:38:41 GMT
 < Date: Sat, 17 Feb 2018 19:38:41 GMT
 < Cache-Control: private, max-age=0, must-revalidate, no-transform
 < Vary: Origin
 < Vary: X-Origin
 < Content-Type: application/json; charset=UTF-8
 < Content-Encoding: gzip
 < X-Content-Type-Options: nosniff
 < X-Frame-Options: SAMEORIGIN
 < X-XSS-Protection: 1; mode=block
 < Server: GSE
 < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339;
 quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000;
 v="41,39,38,37,35"
 Transfer incomplete…
 }}

  * Using `overwrite` option

 {{
 mellifera:~ dkocher$ duck --existing overwrite --upload
 googledrive://drive.google.com/My%20Drive/ ~/Desktop/test.png -v
 Authenticating as dkocher…
 > POST /o/oauth2/token HTTP/1.1
 > Accept-Encoding: gzip
 > User-Agent: Google-HTTP-Java-Client/1.24.0-SNAPSHOT (gzip)
 > Content-Length: 196
 > Content-Type: application/x-www-form-urlencoded; charset=UTF-8
 > Host: accounts.google.com
 > Connection: Keep-Alive
 < HTTP/1.1 200 OK
 < Content-Type: application/json; charset=utf-8
 < X-Content-Type-Options: nosniff
 < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 < Pragma: no-cache
 < Expires: Mon, 01 Jan 1990 00:00:00 GMT
 < Date: Sat, 17 Feb 2018 19:39:15 GMT
 < Content-Disposition: attachment; filename="json.txt";
 filename*=UTF-8''json.txt
 < Content-Encoding: gzip
 < Server: ESF
 < X-XSS-Protection: 1; mode=block
 < X-Frame-Options: SAMEORIGIN
 < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339;
 quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000;
 v="41,39,38,37,35"
 Login successful…
 > GET
 /drive/v3/files?fields=files(createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink),nextPageToken&includeTeamDriveItems=true&orderBy=name&pageSize=1000&q='root'%20in%20parents&supportsTeamDrives=true
 HTTP/1.1
 > Accept-Encoding: gzip
 > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64) Google-
 API-Java-Client
 > Host: www.googleapis.com
 > Connection: Keep-Alive
 > Authorization: ********
 < HTTP/1.1 200 OK
 < Expires: Sat, 17 Feb 2018 19:39:16 GMT
 < Date: Sat, 17 Feb 2018 19:39:16 GMT
 < Cache-Control: private, max-age=0, must-revalidate, no-transform
 < Vary: Origin
 < Vary: X-Origin
 < Content-Type: application/json; charset=UTF-8
 < Content-Encoding: gzip
 < X-Content-Type-Options: nosniff
 < X-Frame-Options: SAMEORIGIN
 < X-XSS-Protection: 1; mode=block
 < Server: GSE
 < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339;
 quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000;
 v="41,39,38,37,35"
 Uploading test.png…
 > GET
 /drive/v3/files?fields=files(createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink),nextPageToken&includeTeamDriveItems=true&orderBy=name&pageSize=1&q=name%20%3D%20'test.png'%20and%20'root'%20in%20parents&supportsTeamDrives=true
 HTTP/1.1
 > Accept-Encoding: gzip
 > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64) Google-
 API-Java-Client
 > Host: www.googleapis.com
 > Connection: Keep-Alive
 > Authorization: ********
 < HTTP/1.1 200 OK
 < Expires: Sat, 17 Feb 2018 19:39:17 GMT
 < Date: Sat, 17 Feb 2018 19:39:17 GMT
 < Cache-Control: private, max-age=0, must-revalidate, no-transform
 < Vary: Origin
 < Vary: X-Origin
 < Content-Type: application/json; charset=UTF-8
 < Content-Encoding: gzip
 < X-Content-Type-Options: nosniff
 < X-Frame-Options: SAMEORIGIN
 < X-XSS-Protection: 1; mode=block
 < Server: GSE
 < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339;
 quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000;
 v="41,39,38,37,35"
 < Transfer-Encoding: chunked
 > PATCH /upload/drive/v3/files/1VbDbfFRqPmyKGoit4nNLxlmM-
 Q6E4pCT?supportsTeamDrives=true HTTP/1.1
 > Content-Type: image/png
 > Content-Type: application/json; charset=UTF-8
 > Content-Length: 74877
 > Host: www.googleapis.com
 > Connection: Keep-Alive
 > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64)
 > Accept-Encoding: gzip,deflate
 [▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮] 73.1 KiB (74,877 bytes) of 73.1 KiB
 (100%, 124.6 KB/sec)
 < HTTP/1.1 200 OK
 < X-GUploader-UploadID: AEnB2UoaQ4g2g5944tnEdpB4ExjraEzwTddtE-
 unrr9unoBHxUSA3fHyopG7f7dH_e-luD-ZI8rfRy-WhXt4T2aH6lva8gzktg
 < Vary: Origin
 < Vary: X-Origin
 < Content-Type: application/json; charset=UTF-8
 < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 < Pragma: no-cache
 < Expires: Mon, 01 Jan 1990 00:00:00 GMT
 < Date: Sat, 17 Feb 2018 19:39:20 GMT
 < Content-Length: 132
 < Server: UploadServer
 Upload complete…

 }}}

--
Ticket URL: <https://trac.cyberduck.io/ticket/10201#comment:4>
Cyberduck <https://cyberduck.io>
Libre FTP, SFTP, WebDAV, S3 & OpenStack Swift browser for Mac and Windows


More information about the Cyberduck-trac mailing list