GDataDB icon indicating copy to clipboard operation
GDataDB copied to clipboard

Set permissions

Open mausch opened this issue 10 years ago • 1 comments

Use the Drive API to set permissions for documents created through GDataDB, so they can be shared with personal accounts and thus opened with the Drive web UI.

mausch avatar Aug 14 '15 11:08 mausch

I make a method that add permission in the file

var request = _requestFactory.CreateRequest();
request.Headers.Set("Content-Type", "application/json");
var data = JsonConvert.SerializeObject(new {
        role = role,
        type = type,
        value = email
});
request.UploadString(string.Format("https://www.googleapis.com/drive/v2/files/{0}/permissions", this._id), data);

fabriciogd avatar Dec 11 '15 00:12 fabriciogd