Configuring Attachment Size
You can limit the size of files that can be uploaded and attached in Confluence.
To configure the maximum file size that can be uploaded:
Go to Administration menu , then General Configuration.
- Choose Edit.
Enter the maximum size next to Attachment Maximum Size.
The default is 100 MB.Choose Save.
Related pages:
How attachments are indexed
When a file is uploaded, Confluence will attempt to extract and index its text. This allows people to search for the content of a file, not just the filename. This process is quite memory intensive and can cause out of memory errors when very large files are uploaded. Confluence has a number of safeguards to prevent this happening:
- For Office, PDF, and other files that use plugin-based extraction, Confluence skips new text extraction when the file exceeds the
atlassian.indexing.attachment.maxsizelimit (100 MB by default). Confluence can still index attachment metadata and reuse previously extracted text. For text and XML files, the same setting limits how many input bytes Confluence reads, rather than excluding the entire file. - If the uploaded file is one of the following types, Confluence will only extract up to:
- 1 MB of text from Excel (.xlsx) and PowerPoint (.pptx)
- 8 MB of text from PDF (.pdf)
- 16 MB of text from Word (.docx)
- 100 MB of input from text and XML files by default, controlled by
atlassian.indexing.attachment.maxsize
As files such as
.xlsxand.docxcontain compressed data, text extraction may reach a processing limit even when the uploaded file is smaller than the attachment-size limit. Extraction limits also do not guarantee that an OpenSearch indexing request stays within the search service’s request-size limit. Oversized requests can fail with HTTP 413.
- If the text extracted from the file was greater than 1 MB, it will be searchable, but Confluence will not show this text as an excerpt with the search result.
If Confluence stops extracting text, only a portion of the file's content will be searchable.
Confluence will only attempt to extract and index the file once. If it fails, it will not try again.
Some of the values above are configurable via system properties. If you experience out of memory errors when people upload large files, you may want to reduce these limits further, using the following properties:
atlassian.indexing.attachment.maxsize
officeconnector.excel.extractor.maxlength
officeconnector.textextract.word.docxmaxsize
atlassian.indexing.contentbody.maxsize
officeconnector.powerpoint.extractor.maxlength