Merge lp://qastaging/~amigadave/unity-scope-gdrive/download-self-url into lp://qastaging/unity-scope-gdrive

Proposed by David King
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 23
Merged at revision: 24
Proposed branch: lp://qastaging/~amigadave/unity-scope-gdrive/download-self-url
Merge into: lp://qastaging/unity-scope-gdrive
Diff against target: 12 lines (+1/-1)
1 file modified
unity-scope-gdocs (+1/-1)
To merge this branch: bzr merge lp://qastaging/~amigadave/unity-scope-gdrive/download-self-url
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Review via email: mp+129633@code.qastaging.launchpad.net

Description of the change

Use ‘self’ link-type to open files in a browser

Using the content URI directly gives a link to download the file,
although it is much more useful to get the link for the file at Google
Drive (the ‘self’ type) to allow it to be viewed or edited before
download.

To post a comment you must log in.
23. By David King

Use ‘alternate’ link-type to open files in a browser

Using the content URI directly gives a link to download the file,
although it is much more useful to get the link for the file at Google
Drive (the alternate type) to allow it to be viewed or edited before
download.

Revision history for this message
David King (amigadave) wrote :

I updated the URL to be the ‘alternate’ type, which seems to match the pre-libgdata behaviour of the scope, which was to always request the first link in the entry as the file URL. After a bit of investigation, the first element seems to be of the ‘alternate’ type, corresponding to (from the Google API reference) a ‘Link at which a user could consume the same content given here, but in a web browser with a user interface.’ which seems to be what is desired here.

Revision history for this message
Alberto Mardegan (mardy) wrote :

Thanks, works like a charm! :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches