Attaching files and folders to pages [TF CD]
Learn how to attach files and folders to your pages with the Team Files macro to share the knowledge with your team.
About the Team Files macro
Our macro allows you to attach all kinds of files and even entire folders to your pages using a particular view of the file manager. You can insert the macro on your pages as many times as you need and attach as many files and folders as you want per macro.
On this page, we'll show you how to use the macro so you and your team can share the relevant files and folders in the right place, quickly building your one source of truth inside Confluence.
Not fully available on public pages
Currently, we can only display the Team Files macro to logged-in users in Confluence Data Center.
This limitation means that, on public pages, users not logged in don't have access to the attached files or folders.
This feature is available on Team Files for Confluence Cloud only.
Adding the macro to your page
Adding the Team Files macro to your pages is straightforward, with the { shortcut or via the “Insert” menu.
Using the { shortcut
Instructions:
Enter the edit mode of the page where you want to attach files and folders.
Place the cursor where you want the macro to appear.
Type {team files and select the Team Files app from the dropdown.
Click the macro and then click the "Edit" button.
Browse your connected folders in the Team Files dialog. If you haven't connected any, you can do that so now. You can also connect more folders from the context menu as you would in the file manager.
Click the checkbox to select the files and folders you want to attach. They will appear in the live preview pane on the right side.
Optional: click the “Layout” tab to customize how attachments look on your page.
Click the "Insert" button.
All done.
While in edit mode, you can only see the macro placeholder and add more files and folders by clicking the "Edit" button again. When you publish the page, you can preview your attached items, edit documents, and browse your folders.
To ensure you're selecting the right file, you can preview your files as you would on the file manager. Click the name to open the full-screen preview or click the disclosure button on the live preview pane to preview the content, as you would on files and folders already attached.
Using the "Insert" menu
Instructions:
Enter the edit mode of the page where you want to attach files and folders.
Place the cursor where you want the macro to appear.
Click the "Insert" menu on the toolbar (+) and then click "Team Files."
Browse your connected folders in the Team Files dialog. If you haven't connected any, you can do that so now. You can also connect more folders from the context menu as you would in the file manager.
Click the checkbox to select the files and folders you want to attach. They will appear in the live preview pane on the right side.
Optional: click the “Layout” tab to customize how attachments look on your page.
Click the "Insert" button.
While in edit mode, you can only see the macro placeholder and add more files and folders by clicking the "Edit" button again. When you publish the page, you can preview your attached items, edit documents, and browse your folders.
Customizing the layout
By default, the files and folders attached to Confluence pages use a regular header and appear in the collapsed view to use less space on the screen. It’s easy to preview the file by clicking the arrow to open the expanded view, which uses the width of the page and is 464px tall.
The Admin can set different defaults for new macros, and you can customize individual macros.
You can set different layout settings when attaching files and folders in a new macro or by editing existing macros by clicking the “Layout” tab in the Team Files dialog. You can preview the changes in the “Live Preview” panel. You’ll see the new layout applied to your page when you save the changes.
Attachment header
Select the size for the header of the macro:
Regular: The standard size for the header of attached files and folders. It shows a big icon and additional details;
Compact: Uses a smaller icon and only indicates the name of the file or folder;
Hidden for files: Completely hides the file header and forces the expanded preview option. Moving the mouse over the file will show a compact header.
Preview width
Select the width for the preview:
Auto: The standard width for previews uses the available space;
Custom: Define a value for the width of the preview area.
Preview height
Select the height for the preview:
Regular: The standard height for previews (400px);
Custom: Define a value for the height of the preview area.
Preview default visibility
Select the behavior for the preview:
Collapsed: The standard option that hides the preview;
Expanded: Automatically shows the preview of files and folders. This option is required when selecting the “Hidden for files” header.
Reorder items
You can reorder files and folders in the macro.
Instructions:
Enter the edit mode of the page
Select the macro you want to change
Click the edit button
Click and drag the handle on the left side of the item you want to reorder to the desired place.
Repeat as needed.
Click the “Save“ button when you’re done.
Removing attached files and folders
You can remove specific files and folders attached to a macro at any moment.
Instructions:
Enter the edit mode of the page.
Select the macro that you want to change.
Click the "Edit" button.
The live preview pane lists all the attached files. Click the unlink button for the ones you want to remove from the macro.
Click the "Save" button.
Your macro is updated.
Removing the macro
You can also remove the entire macro, removing all the files and folders attached to it at once.
Instructions:
Enter the edit mode of the page.
Select the macro that you want to remove.
Click the "Remove" button.
Wrap up
Now you know how to attach files and folders to your pages and make changes to your macros. Don't forget you can connect more folders from the file manager.
If you still have questions about the topics covered on this page, visit our support portal and send them to us. Our team is always happy to help.