Reputation: 22223
Is there a way to create or set permissions on a Google Drive folder that allows users to create or upload files to the folder, but not create additional nested folders? Ultimately I would like users to be able to add files to folders, but not change the overall folder structure.
I've been able to set the role of the user for a folder: https://developers.google.com/drive/api/v3/reference/permissions/create
However, once I give "writer" permission to a user they are able to both upload files and create folders.
https://developers.google.com/drive/api/v3/manage-sharing
Upvotes: 1
Views: 3575
Reputation: 15377
Unfortunately, the permission and role functionality combined with the structure of Drive don't allow for the ability to allow users to upload and edit files without also allowing them to change the apparent folder structure of the Drive.
As stated on the Google Drive REST API Documentation about Permission structures in Drives, a file's permission consists of four parameters:
There are only 5 assignable roles for file permissions, as can been seen in this table:
Additionally, Google Drive doesn't use a file system, and in actual fact folders in Drive are just files with MIME Type application/vnd.google-apps.folder
. You can see this by querying the MIME Type of a folder ID or on the Drive Supported MIME Types reference.
Upvotes: 1