문제

I have a requirement to change the sharing settings on a number of files hosted in Google Docs. I know that I can use DocsList Services with Google Apps Script if I want to add or remove Editors or Viewers from a file using calls like this:

var file = DocsList.createFile("My File", "ABC");
file.addEditor("MyUserName");

What I am looking for is a function that I can call that will allow me to change the overall sharing setting of the file from "Private" to "Anyone with a link". Does such a function exist anywhere? Thanks!

도움이 되었습니까?

해결책

Afraid not. You are welcome to request this as a requested new feature enhancement in the Issue Tracker.

http://code.google.com/p/google-apps-script-issues/issues/list

다른 팁

That is indeed not possible, but there's a somewhat easy workaround. You can always place a document in a folder that is previously shared for "Anyone with a link", then the documents will be shared too. Since a document can be in multiple folders, you can have a folder just for that without messing with your current folder structure.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top