Supported Upload Formats
Your collection is rarely PDF only: Word reports, execution spreadsheets, presentations, pages saved as HTML — and all of it often zipped together. The Upload page accepts Office documents (DOCX, XLSX, PPTX) and HTML as files, including inside ZIP/TAR/GZ packages. Each format is extracted preserving its structure (sections, spreadsheets, slides) and follows the same path as always: splitting into excerpts, semantic vectors, entity identification, graph and search. You upload what you have, the way you have it.
This guide details what is accepted, the limits and the rejection rules. The general upload flow — target context, batch queue, tracking — is in the upload and ingestion guide.
1. Accepted formats
| Group | Extensions |
|---|---|
| Document | pdf, docx |
| Spreadsheet | xlsx |
| Presentation | pptx |
| Web | html, htm |
| Text/data | txt, csv, json, xml, md, tsv, log |
| Packages | zip, gz, gzip, tar, tar.gz, tgz (containing any format above) |
A file outside the list is refused with:
"Formato de arquivo não suportado: .<ext>. Formatos aceitos: PDF, DOCX, XLSX, PPTX, HTML, TXT, CSV, JSON, XML, MD, TSV e LOG." ("Unsupported file format: .<ext>. Accepted formats: PDF, DOCX, XLSX, PPTX, HTML, TXT, CSV, JSON, XML, MD, TSV and LOG.")
2. Limits per format
These are the default values. The administrator can adjust them at installation through the environment variables listed below.
| Limit | Value | Where it comes from |
|---|---|---|
| Upload (any file/request) | 256 MB | The request body limit at the platform edge, aligned with the in-memory read limit at the same edge; during ingestion the multipart is written to disk (spring.webflux.multipart, 300 MB per part ceiling) |
| no ceiling of its own — the general 256 MB limit applies | The PDF is read straight from the file, in random access: a full case record of 1,700+ pages and 118 MB never passes through the application's memory | |
| DOCX | 25 MB | datta.document.max-docx-size-bytes (DATTA_MAX_DOCX_SIZE_BYTES, 26214400) |
| XLSX | 100 MB | datta.document.max-xlsx-size-bytes (104857600) — read in streaming, without loading the whole spreadsheet |
| PPTX | 60 MB | datta.document.max-pptx-size-bytes (62914560) |
| HTML | 10 MB | datta.document.max-html-size-bytes (10485760) |
| Extracted text per document | 4,000,000 characters | datta.document.max-text-length (DATTA_DOC_MAX_TEXT_LENGTH) — covers a full case record of ~1,700 pages (≈ 3.3 million characters); the excess is truncated with a warning in the metadata |
| Decompressed content of packages | 500 MB per package | Anti zip-bomb protection during extraction |
Exceeded the format's limit? The message is:
"O arquivo "<nome>" excede o limite de <N> MB para o formato <FORMATO>. Divida o conteúdo em arquivos menores e envie novamente." ("The file "<name>" exceeds the <N> MB limit for the <FORMAT> format. Split the content into smaller files and upload again.")
Why do DOCX and PPTX have a lower ceiling? Because reading those two formats loads the file into memory. XLSX uses streaming (SAX) reading and therefore accepts much larger files without risking the service's memory.
3. Rejection rules (security)
All validation happens before the file touches the extractor, and the refusal comes back as a validation error (HTTP 422) with a message in Portuguese — never a technical stack trace. The messages below are the real system messages:
| Rule | Message |
|---|---|
Macros (.docm, .xlsm, .pptm, .dotm, .xltm, .potm, .ppsm) | "Arquivos com macros (.docm) não são aceitos por segurança. Salve o documento no formato equivalente sem macro (.docx, .xlsx ou .pptx) e envie novamente." |
Embedded macro (a .docx file containing vbaProject.bin) | "O arquivo "<nome>" contém macros embutidas e não é aceito por segurança. Salve o documento sem macros e envie novamente." |
Legacy Office (.doc, .xls, .ppt — OLE2 binary) | "O formato legado .doc não é suportado. Converta o arquivo para o formato Office atual (.docx, .xlsx ou .pptx) e envie novamente." |
Content diverging from the extension (e.g. a PDF renamed to .docx) | "O conteúdo do arquivo "<nome>" não corresponde ao formato <FORMATO> declarado pela extensão. Verifique o arquivo e envie novamente." |
| OLE2 renamed to an OOXML extension | "O arquivo "<nome>" está no formato Office legado (binário OLE2). Converta para o formato atual (.docx) e envie novamente." |
| HTML with binary content | "O conteúdo do arquivo "<nome>" não parece ser HTML. Verifique o arquivo e envie novamente." |
| Corrupted OOXML container | "O arquivo "<nome>" parece corrompido e não pôde ser validado. Gere o arquivo novamente e reenvie." |
| Empty file | "O arquivo enviado está vazio." |
How it works under the hood: validation checks the extension, then the limits, then the magic bytes (%PDF, the PK.. ZIP signature of current Office formats, the OLE2 signature of legacy Office) and finally the Office container's content — [Content_Types].xml plus the main part (word/, xl/ or ppt/), inspecting at most 500 entries. The global anti zip-bomb protections for Office formats are a minimum inflate ratio of 0.01, a maximum entry of 256 MB and at most 10,000 entries — all configurable through the DATTA_OOXML_* variables.
4. How each format becomes sections
The extracted text is split into sections, and it is the sections that guide the split into excerpts and the citations search returns.
| Format | Sections |
|---|---|
| DOCX | Each heading (Título/Heading 1–9 styles) opens a section with the heading's text as its title. Tables are linearized (cells separated by `\ |
| XLSX | Each sheet (tab) is a section, with the tab name as its title. Each row becomes a line of text with the values as displayed (formatting applied), separated by tabs. Streaming read — spreadsheets with hundreds of thousands of rows do not blow up memory (text beyond the limit is truncated with a warning). |
| PPTX | Each slide is a section; the slide title becomes the section title (falling back to "Slide N"). The presenter notes go at the end of the slide's text, with the "Notas do apresentador:" prefix. |
| HTML | Goes through the same main-content extractor used by URL ingestion — menus, footers and ads are removed, the article remains. Uploading an .html produces the same text as ingesting that page through the URL tab. Single section. |
| Behavior unchanged (direct text extraction). | |
| TXT/CSV/JSON/XML/MD/TSV/LOG | Single "Conteúdo Principal" section (UTF-8, with ISO-8859-1 as the fallback). |
After extraction, nothing changes compared to the older formats: splitting into excerpts (200 words with a 30-word overlap), automatic semantic vectors, entity identification with the context's model, writing to the graph and to the indices, full lineage — and the original file is stored with a SHA-256 hash, recoverable on the document's screen.
Entity identification in long documents
Entity identification no longer truncates the text at the first 10,000 characters. Documents larger than one window (DATTA_NER_WINDOW_CHARS, default 40,000 characters) are split into windows aligned on paragraph breaks and analyzed with controlled parallelism (DATTA_NER_CONCURRENCY, default 2 — the low number protects the AI provider's per-minute quota). The entities and relationships from the windows are merged with deduplication: the same type plus the same name yield a single entity, and complementary properties are merged.
AI cost is capped per document: at most DATTA_NER_MAX_WINDOWS windows (default 24, the equivalent of ~960 thousand characters). If the document has more windows than that, they are distributed evenly across the beginning, middle and end, and the file ends with the warning "NER cobriu N de M trechos do documento (amostragem distribuída…)" ("NER covered N of M excerpts of the document (distributed sampling…)"). Raise DATTA_NER_MAX_WINDOWS when full coverage is worth the cost.
5. Packages (ZIP/TAR/GZ)
The new formats also work inside packages, in batch upload: each processable extracted file joins the same queue in the executions hub. Malicious paths (zip-slip) are ignored and the total decompressed size is limited to 500 MB per package.
Practical example — a ZIP with a report, a spreadsheet and slides
- You have
prestacao-contas-2026.zipwithrelatorio.docx(12 MB),execucao.xlsx(40 MB) andapresentacao.pptx(18 MB). - In , select the target context and upload the ZIP.
- The platform unpacks it safely and each file joins the same processing queue, visible in the batch's group.
- At the end: the report became sections by heading, each spreadsheet tab became a section with the rows as displayed, and each slide — including the presenter notes — became a section of its own.
- Search for a term from the report: the result cites the source section, and the original file remains available on the document's screen.
6. Troubleshooting
| Symptom | Cause | What to do |
|---|---|---|
| "Arquivos com macros (...) não são aceitos" | A .docm/.xlsm/.pptm document | Save as .docx/.xlsx/.pptx (File → Save as) and re-upload |
| "O formato legado .doc não é suportado" | Office 97–2003 (OLE2 binary) | Open it in Word/Excel/PowerPoint and save in the current format |
| "não corresponde ao formato declarado pela extensão" | A renamed file (e.g. a PDF with a .docx extension) | Fix the extension to the real format |
| Document came in "flat", without sections | DOCX without heading styles | Expected behavior (single section); applying heading styles improves the citations |
| Spreadsheet text truncated | The 4,000,000-character extracted-text limit | Split the spreadsheet; the warning stays in the document's metadata |
| "excede o limite de N MB para o formato" | A file larger than the format's ceiling | Split the content; the administrator can adjust the DATTA_MAX_*_SIZE_BYTES variables |
| "O arquivo excede o tamanho máximo aceito pelo servidor (256MB)" | A file larger than the general edge limit | Split the file; the administrator can raise the general limit, keeping the request body ceiling and the in-memory read ceiling aligned |
| "NER cobriu N de M trechos do documento" | A very long document — entity identification sampled distributed windows | Expected behavior; raise DATTA_NER_MAX_WINDOWS for full coverage |
| "Nenhum PDF disponível para este processo" (Cases panel) | A document ingested before original-file storage (the binary was discarded) | Re-upload the same file: the platform dedupes by text and adds the PDF/ZIP (architecture) |