I can make a folder using this code
var request = gapi.client.request({
'path': '/drive/v3/files/',
'method': 'POST',
'headers': {
'Content-Type': 'application/json'
//'Authorization': 'Bearer ' + token
},
'body':{
"name" : "copy",
"mimeType" : "application/vnd.google-apps.folder",
}
});
request.execute(function(resp) {
console.log(resp);
//document.getElementById("info").innerHTML = "Created folder: " + resp.title;
});
but I cant figure out for the life of me how to make the folder shared to all, I seen in the documentation to put type:anyone but I cant figure out how to do it in the code, thank you for your time
You create a permission for a file or folder with this REST function:
So you can do:
If it's successful, it'll give you a Permissions resource as a result:
I give you links to the reference, but I haven't found any example there: