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

Check for missing downloadUrl #40

Merged
merged 1 commit into from Nov 11, 2015
Merged

Conversation

theopolis
Copy link

To be honest, I'm not 100% sure when downloadUrl is missing-- but I have a few on the items I've accumulated over the years of my docs/drive foolery.

@vitalif
Copy link
Owner

vitalif commented Nov 10, 2015

Interesting, a file with MD5 checksum but without downloadUrl? What is it then?
Can you post a json dump of it here? (you can get it by logging HTTP requests with --http-log option)

@theopolis
Copy link
Author

Looks something like:

 {
   "kind": "drive#file",
   "id": "REMOVED",
   "etag": "\"REMOVED\"",
   "selfLink": "https://www.googleapis.com/drive/v2/files/REMOVED",
   "webContentLink": "https://docs.google.com/a/REMOVED&export=download",
   "alternateLink": "https://drive.google.com/a/REMOVED/view?usp=drivesdk",
   "iconLink": "https://ssl.gstatic.com/docs/doclist/images/icon_10_powerpoint_list.png",
   "thumbnailLink": "https://lh4.googleusercontent.com/REMOVED",
   "title": "REMOVED.pptx",
   "mimeType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
   "labels": {
    "starred": false,
    "hidden": false,
    "trashed": false,
    "restricted": true,
    "viewed": false
   },
   "createdDate": "2014-01-30T14:28:25.836Z",
   "modifiedDate": "2014-01-30T14:28:25.836Z",
   "markedViewedByMeDate": "1970-01-01T00:00:00.000Z",
   "version": "535003",
   "parents": [
    {
     "kind": "drive#parentReference",
     "id": "REMOVED",
     "selfLink": "https://www.googleapis.com/drive/v2/files/REMOVED",
     "parentLink": "https://www.googleapis.com/drive/v2/files/REMOVED",
     "isRoot": false
    }
   ],
   "userPermission": {
    "kind": "drive#permission",
    "etag": "\"REMOVED\"",
    "id": "me",
    "selfLink": "https://www.googleapis.com/drive/v2/files/REMOVED/permissions/me",
    "role": "reader",
    "type": "user"
   },
   "originalFilename": "REMOVED.pptx",
   "fileExtension": "pptx",
   "md5Checksum": "REMOVED",
   "fileSize": "6142792",
   "quotaBytesUsed": "0",
   "ownerNames": [
    "NOT ME"
   ],
   "owners": [
    {
     "kind": "drive#user",
     "displayName": "NOT ME",
     "picture": {
      "url": "REMOVED"
     },
     "isAuthenticatedUser": false,
     "permissionId": "REMOVED",
     "emailAddress": "REMOVED"
    }
   ],
   "lastModifyingUserName": "NOT ME",
   "lastModifyingUser": {
    "kind": "drive#user",
    "displayName": "NOT ME",
    "picture": {
     "url": "REMOVED"
    },
    "isAuthenticatedUser": false,
    "permissionId": "REMOVED",
    "emailAddress": "REMOVED"
   },
   "editable": false,
   "copyable": false,
   "writersCanShare": true,
   "shared": true,
   "explicitlyTrashed": false,
   "appDataContents": false,
   "headRevisionId": "REMOVED",
   "spaces": [
    "drive"
   ]
  },

@vitalif
Copy link
Owner

vitalif commented Nov 10, 2015

And what if you click webContentLink? Will it download the original pptx?

@theopolis
Copy link
Author

Nope! webContentLink says the owner hasn't given me permission to download. The alternateLink allows me to view the content only.

vitalif added a commit that referenced this pull request Nov 11, 2015
@vitalif vitalif merged commit afbd9d7 into vitalif:master Nov 11, 2015
@vitalif
Copy link
Owner

vitalif commented Nov 11, 2015

Aha... ok :) thanks for this correction then.

@theopolis
Copy link
Author

You got it! Happy to help however possible 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants