How to Fix Confluence Attachment Upload Errors
In this tutorial, you'll learn about How to Fix Confluence Attachment Upload Errors. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.
You try to upload a file to a Confluence page and it fails with "File too large," "Invalid file type," or the upload bar gets stuck. Confluence has attachment limits.
The Wrong Way
// Uploading a 100 MB video file to a Confluence page
page.attach('demo.mp4');
Confluence Cloud limits attachments to 10 MB on Free plans and 100 MB on Standard plans. Large files fail silently.
The Right Way
Step 1: Check file size limits
# Confluence Cloud limits:
# Free: 10 MB per attachment
# Standard: 100 MB
# Premium: 250 MB
# Data Center: configurable (default 100 MB)
Step 2: Compress before uploading
# Compress images:
convert screenshot.png -quality 80 screenshot.jpg
# Compress PDF:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen \
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf input.pdf
Step 3: Upload via drag-and-drop (correct way)
# Open the Confluence page
# Drag the file from your file manager
# Drop it on the page where you want it to appear
# This avoids the HTML upload button's file-type restrictions
Step 4: Use external storage for large files
# For files > 100 MB:
# 1. Upload to Google Drive, OneDrive, or S3
# 2. Use the "Link" macro to embed the file link
# 3. Or use the "Office" connector for live documents
Attachment "architecture-diagram.png" (2.3 MB) uploaded successfully — displays inline on the page.
Prevention
- Keep attachments under 5 MB for reliable uploads on all plans.
- Use linked content (Google Drive, OneDrive) for files over 50 MB.
- The compression-first approach is standard in Durga Antivirus Pro's file quarantine — logs and archives are compressed before storage to save space.
Common Mistakes with attachment upload
- Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
- Using
headandtailinstead of pattern matching, causing runtime errors on empty lists - Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
These mistakes appear frequently in real-world CONFLUENCE code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro