Coming soon. The Wiki is in active development, so features and these docs may still change. Early adopters: contact us for access.

Files and attachments

Attach any file to a page and show it as a card, a PDF preview, a list of the page's files or a gallery of its images

1. Overview

Besides images and videos, a page can hold any file: PDFs, Word, Excel and PowerPoint documents, archives, drawings. Three blocks show a page's files to its readers:

BlockShowsInsert with
FileOne file as a card with its name, kind and size, with Preview and Download; a PDF or an image can also be shown in the page itself/file or Insert file, or drop the file onto the page
Attachments listEvery file attached to the page, with an Upload files button for people who edit it/attachments or Insert attachments list
GalleryThe page's images as a grid of tiles that open full size/gallery or Insert gallery

The blocks show the files of the page they are on. Readers see a file only once the page shows it to them: see Who sees which files.

2. File

Choose /file (or Insert file in the toolbar's Insert menu) and pick one of Files of this page, find one by name, or Upload a file. Dropping or pasting a file that isn't an image onto the page uploads it and puts a File block where you dropped it.

A File block as readers see it: a Word document's name, kind and size, with Preview and Download
A File block as readers see it: a Word document's name, kind and size, with Preview and Download
  • Display: Card (the default) shows the file's name, kind (Image, Video, PDF or File) and size. Shown in the page, for PDFs and images, draws the file itself in the page, with a Height of 200 to 1,200 pixels (600 by default).
  • Preview opens images, videos and PDFs full size over the page; Esc or Close goes back. Other files, such as Word or ZIP files, only download.
  • Download saves the file under its name. Files other than images, videos and PDFs always download, never open in the browser.
  • When a file is renamed, the card shows its new name. When a file is deleted from the page, the card says File removed, with the name it had.

A PDF shown in the page is drawn page by page as you scroll to it, up to 50 pages; after that it says how many more pages there are and offers the download. The PDF's links, forms and scripts don't run. A PDF that can't be drawn says so and offers the download instead.

A PDF shown in the page, 600 pixels high, with its first page drawn
A PDF shown in the page, 600 pixels high, with its first page drawn

3. Attachments list

The Attachments list lists the page's files, newest first, with each file's kind, size and date and a Download link (and Preview for images, videos and PDFs). The first 100 show at once; Show more shows the rest.

An attachments list showing PDFs and Office files, with Upload files for an editor
An attachments list showing PDFs and Office files, with Upload files for an editor
SettingWhat it does
File typesOnly images, videos, PDFs or other files, or any mix. None ticked lists every kind.
File name filterOnly files whose names match, with * for any characters and ? for one, and commas between several: *.pdf, *.docx.
OrderNewest first, Oldest first, Name or Size.
Show an upload button to editorsOn by default. People who may edit the page get Upload files; what they upload there is listed for readers at once, without publishing the page again.

Templates can hold an attachments list too: a page made from the template lists its own files.

A Gallery shows images as square tiles. Select one to see it full size: the arrows (or the arrow keys, and swiping on a phone) go to the previous and next image, and Esc closes it.

A gallery of six images in four columns, with a title and the file names under them
A gallery of six images in four columns, with a title and the file names under them
An image of a gallery opened full size: image 3 of 6, with the previous and next arrows
An image of a gallery opened full size: image 3 of 6, with the previous and next arrows
SettingWhat it does
ImagesEvery image of the page (new images join it by themselves), or Images I choose, up to 60, in an order you set with Move up and Move down.
TitleShown above the gallery (optional).
Columns2 to 6 (4 by default). Phones show two.
OrderFor every image of the page: Name (the default), Newest first, Oldest first or Size.
Show file namesOn by default: each tile shows its image's name.

A page holds up to 10 galleries. Galleries show the images as they were uploaded, so a gallery of many large photos takes a while on a slow connection: the tiles further down load as you scroll to them.

5. Who sees which files

  • People who may edit a page see all of its files, in the editor and in the blocks.
  • Readers see a file that a published version of the page shows (in a File block or a gallery you chose the images of, or as an image or video) and every file uploaded through an attachments list's Upload files.
  • A file uploaded in the editor and not yet published reaches readers when the page is published.
  • Inside a page included in another (Include page), an attachments list and a gallery of every image say that the files are on the included page; File blocks and galleries of chosen images still show.

6. Rename and delete

A file keeps the name it was uploaded with. People who may edit the page can rename or delete one through the API; a renamed file stays in every block that shows it, and a deleted one shows as File removed in the blocks and versions that showed it.

7. Downloads and imports

  • In a page downloaded as Word or PDF, a File block is a line with the file's name, kind and size, linked to the file; an attachments list lists the files you may see (up to 100); a gallery prints its images one under another (up to 24). PDFs shown in the page are printed as their line.
  • Confluence's file macros (View file, PDF, Office viewers, Multimedia), Attachments and Gallery become these blocks in an import, and every attachment is imported, except blocked or too-large files.

8. Limits

WhatLimit
Images, videos, subtitles20 MB, 200 MB and 512 KB, as before (see Images and videos)
PDFs and other files100 MB by default; your administrator sets it between 1 and 200 MB
Blocked file namesFiles ending in .exe, .msi, .bat, .cmd, .com, .scr, .ps1, .dll, .jar, .app or .dmg can't be attached, unless your administrator changes the list
Per page500 files and 1 GB together
Galleries10 a page; 60 chosen images each

A refused file says why: Files ending in .exe can't be attached here, or that the file is too large.

9. For administrators

Settings → Security → Attachments (settings:write) decides which files pages take, for the whole installation:

Settings → Security → Attachments: the largest file and the blocked extensions
Settings → Security → Attachments: the largest file and the blocked extensions
SettingDefaultEffect
Largest file100 MBFor PDFs and other files, from 1 to 200 MB. Images, videos and subtitles keep their own limits.
Blocked extensionsexe, msi, bat, cmd, com, scr, ps1, dll, jar, app, dmgFiles whose names end in one of these can't be attached to any page. Type an extension (without the dot) and choose Block; up to 100.

Save with the Security page's Save bar. Files already attached stay as they are. Imports follow the same settings: a blocked or too-large file is left out and counted in the import report.

The Wiki doesn't scan files for viruses. Files other than images, videos and PDFs are always downloaded, never opened in the browser, but keep the blocked list for files that run when opened.

Changing the settings raises attachment_settings.update; renaming a file raises page.attachment.update; uploading and deleting any file raise page.attachment.create and page.attachment.delete. Policies can refuse each of them; see Events. The changes are in the audit log.

10. API

MethodPathWhoWhat
GET/api/spaces/{key}/pages/{id}/attachmentsRead the pageThe page's files you may see: everything for its editors, the listed files and those its latest published version shows for readers. kind (image, video, pdf, file, comma-separated), q (part of the name), sort (new, old, name, size), cursor, limit
POST/api/spaces/{key}/pages/{id}/attachmentsEdit the pageUpload a file (multipart, field file). any=true takes PDFs and other files; listed=true puts it in the attachments list. Both go before file
GET/api/spaces/{key}/pages/{id}/attachments/{attachment}Read the pageThe file; ?download=1 saves it instead of opening it
PATCH/api/spaces/{key}/pages/{id}/attachments/{attachment}Edit the pageRename: {filename}, 1 to 255 characters
DELETE/api/spaces/{key}/pages/{id}/attachments/{attachment}Edit the pageDelete the file from the page and the versions that showed it
GET/api/wiki/attachment-settingsSigned inblockedExtensions and maxFileMb
PUT/api/wiki/attachment-settingssettings:writeChange them