Question: "anyone with the link can view" permission
RickCogley opened this issue · 8 comments
Use drive pub
.
Hi @clawoflight, thanks. drive pub
makes the link public, which google says is indexed. The above setting is apparently different from that, in that it is not indexed.
Hello again @RickCogley. Unfortunately drive pub
is the only way right now. I didn't know about this nor how to solve this currently. Any doc references?
I looked at the API docs, but, I cannot see anything specific about those two settings which are available in the GUI itself. @odeke-em
Here's what's needed: https://developers.google.com/drive/v3/reference/permissions#resource-representations
type: "anyone"
role: "reader"
allowFileDiscovery: false
It would be very usefull to add the "anyone with the link" feature
Aha I finally now understand the problem. Thank you @thebaddie for rephrasing it and thank you @RickCogley for advocating it, I have been able to locally produce the expected output. PR coming shortly.
Hey folks. Thank you very much for the patience. I finally got time and thought about it. After re-reading the content in the issue I was able to discover how to solve it. The hints and discussions helped a lot. I learnt something about published files being indexed (which is not want the user wants) and also thanks for the reference to the documentation(we were using the same permissions anyways, but a refresher was good). Auto-closed by PR #648. Please get the latest from master
$ go get -v -u github.com/odeke-em/drive/drive-gen && drive-gen
and then you can now do this
$ drive share --type user,anyone,anyone,user --role reader,anyone --emails "emm.odeke@gmail.com" outf.gif
Provide access for accountType(s)
user
anyone
For roles(s)
reader
Addressees:
+ emm.odeke@gmail.com
+ Anyone with the link
File(s) to share:
+ outf.gif
Proceed with the changes? [Y/n]:y
successful share for outf.gif with email "emm.odeke@gmail.com", role "reader" accountType "user"
successful share for outf.gif with email "", role "reader" accountType "anyone"
Then get the URL of the file
$ drive url outf.gif
Please reopen if it persists.