drive icon indicating copy to clipboard operation
drive copied to clipboard

"drive share --with-link" does not return a URL, but throws a "googleapi: Error 400: Permission value field required" although the file is correctly shared.

Open jean-christophe-manciot opened this issue 8 years ago • 5 comments

file="Proposal for a DNS Secured BGP.pdf"
drive share --with-link -no-prompt -verbose "$file" 2>&1
successful share for Proposal for a DNS Secured BGP.pdf with email "", role "reader" accountType "anyone"

share err Proposal for a DNS Secured BGP.pdf: googleapi: Error 400: Permission value field required, required

On Google Drive: share

Publishing works as expected, for the same file:

drive pub -hidden "$file" 2>&1
/Missions/Innovations/Proposal for a DNS Secured BGP.pdf published on https://drive.google.com/open?id=0B6XxNd5c3zV_LWNKZmxUSGVZZDA

jean-christophe-manciot avatar Dec 27 '16 10:12 jean-christophe-manciot

Ubuntu 16.10 4.8 drive version couldn't be any fresher:

drive version: 0.3.8.1
Commit Hash: 'fa3d326f72ae91399b2aa607c79293fb8a293b96'
Go Version: go1.7.1
OS: linux/amd64
BuildTime: 2016-12-24 06:22:04.78836032 +0100 CET

jean-christophe-manciot avatar Dec 27 '16 16:12 jean-christophe-manciot

I stumbled upon this scenario too.

The command drive share --with-link MYFILE does get the file sharing property correctly changed.

The issue is that it does not return the sharing link but the 400 error instead. Apparently there is no command for getting the sharing link either. Although one could always run drive file-id MYFILE afterwards and construct the sharing link.

drupalista-br avatar Feb 08 '17 01:02 drupalista-br

@drupalista-br Yes, you're right, nice workaround :-)

jean-christophe-manciot avatar Feb 08 '17 08:02 jean-christophe-manciot

I'll add my one-liner to get the link: echo 'https://drive.google.com/open?id='"$(drive id MYFILE | awk -v RS="" -F\" '{print $3}')" And ask if there's any perspective of getting this fixed?

FR86 avatar Dec 01 '19 15:12 FR86

@odeke-em seems to have dropped the ball.

jean-christophe-manciot avatar Dec 02 '19 10:12 jean-christophe-manciot