POST /namespaces/:namespace/files
Send the file’s bytes as the request body. Each PDF page becomes a document, and each worksheet
becomes one or more documents of Markdown tables.
Response
Request
Query parameters:name(string, required): The file’s name.id(string): The file id, which prefixes its document ids. 1-180 characters ofA-Z a-z 0-9 . _ -, starting with a letter or digit. Defaults toname, with other characters replaced by-.
.xlsx workbook, up to 20 MiB and 2,000 pages or sheets.
Response
file_id: The file id.type:pdforxlsx.ids: The documents written, in reading order.pages(PDF) orsheets(workbook): How many the file has.pages_without_text(PDF): Pages that weren’t stored because they have no text layer, such as scans.
Documents
A large worksheet is split into several documents, each repeating the header row.
Working with files
- Update a file by uploading it again with the same file id. Its old documents are replaced.
- Search one file with a filter:
{ "file_id": "handbook.pdf" }. - Delete a file with a filter delete:
{ "filter": { "file_id": "handbook.pdf" } }.
Errors
415 unsupported_file: The body is neither a PDF nor an.xlsx.422 unreadable_file: The file is damaged or encrypted.422 no_text: No page or sheet has text.