Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Google Drive --existing file management #10201

Closed
cyberduck opened this issue Jan 17, 2018 · 2 comments
Closed

CLI Google Drive --existing file management #10201

cyberduck opened this issue Jan 17, 2018 · 2 comments
Assignees
Labels
bug fixed googledrive Google Drive Protocol Implementation
Milestone

Comments

@cyberduck
Copy link
Collaborator

ec43fec created the issue

This issue is specifically about Google Drive. I tried the same scenario on a Sftp server and -e command worked fine.

When i try to upload any file/folder to Google Drive the overwrite/skip/compare are ignored. I must add -e to let the upload begin (otherwise the terminal ask me to specify the action), but action is actually ignored (except cancel).
The files are always successfully uploaded, but when i try to upload a file with the same name it is not overwritten or skipped. At the end i get 2 files with the same name on Google Drive. I don't get any error during the process.


Attachments

@cyberduck
Copy link
Collaborator Author

@dkocher commented

I cannot reproduce this issue any longer with version 6.4.0.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

  • 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…

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed googledrive Google Drive Protocol Implementation
Projects
None yet
Development

No branches or pull requests

2 participants