It is possible to have Drive folders auto-created for each page/post and appended to the bottom of the page. These can act in similar ways to controlled folders, but are associated automatically with the post (or page), and are created in Drive in a special hierarchy.
To get started with Attachment Folders, we will need to visit the Drive Embedder plugin settings (in WordPress admin, go to Settings -> Google Drive Embedder) and ensure everything is configured in the Setup tab. See Enterprise Setup instructions for details.
Inserting an Attachment Folder
There are three different ways to embed an Attachment Folder on a post:
- Check Automatically append attachments folder on post in the Folder Controls tab of Settings -> Google Drive Embedder. Then every post will have an Attachments area added to the bottom when viewed.
- Look for the ‘Drive Attachments Folder’ box on your post editor page. Change the Automatically append Drive attachments folder dropdown to ‘Yes’. If set to ‘Default’ then the folder will show only if the global setting is checked (as in the last bullet point). If set to ‘No’, it will not appear even if the global setting is checked.
- Insert the shortcode [google-drive-folder] in the post text, without any id or cfid parameter.
Now, go to the post and you should see a Drive Attachment section at the bottom – where your users can share files with each other (if they have permissions, of course).
Try dragging a file over that section and see if it will upload for you. Then go to the folder in Drive and see the file there, in a folder named after the post itself, within the Drive hierarchy created for your site.
The great thing about Drive is that files can be in multiple folders at once. So files stored elsewhere in Drive can also be attached to the WordPress folder’s hierarchy and appear at the bottom of relevant pages.
The same permissions can be set for Attachment Folders as they can for Controlled Folders. That is, you can specify how users of different WordPress roles can interact with the folder. The permissions are set in the ‘Drive Attachments Folder’ box on your post editor page. You will only be able to see the settings if you are an admin, or if ‘Allow content authors to override attachment folder permissions’ is checked in the Folder Controls tab of the plugin settings.
By default, the permissions will all be set to Default meaning they inherit from the global plugin settings’ Folder Controls tab.
See Controlled Folders for more details about role permissions.