Merged in feature/support-more-types (pull request #219)

support new types for import

* tests pass

* missing file

* bug fixes
This commit is contained in:
Jay Brown
2026-03-31 17:40:42 +00:00
parent 8e9889accc
commit b71a28d3c0
144 changed files with 28352 additions and 91 deletions
+47 -3
View File
@@ -1049,7 +1049,7 @@ CREATE TABLE documentEntries (
- Multiple entries possible per document for version tracking
#### Document Cleans (`documentCleans`)
PDF validation and format processing records.
Document validation and format processing records.
```sql
CREATE TYPE cleanFailType AS ENUM (
@@ -1061,10 +1061,27 @@ CREATE TYPE cleanFailType AS ENUM (
'small_dimensions',
'large_dimensions',
'small_dpi',
'large_dpi'
'large_dpi',
'password_protected',
'contains_macros',
'empty_content',
'binary_content',
'unsupported_encoding',
'contains_attachments'
);
CREATE TYPE cleanMimeType AS ENUM ('application/pdf');
CREATE TYPE cleanMimeType AS ENUM (
'application/pdf',
'image/tiff',
'image/jpeg',
'image/png',
'image/bmp',
'application/docx',
'application/xlsx',
'application/pptx',
'text/plain',
'message/rfc822'
);
CREATE TABLE documentCleans (
id uuid PRIMARY KEY DEFAULT uuid_generate_v7(),
@@ -1091,6 +1108,33 @@ CREATE TABLE documentCleans (
- Cannot have both success and failure indicators
- Tracks specific failure reasons for troubleshooting
**Supported MIME Types**:
- `application/pdf` -- PDF documents
- `image/tiff` -- TIFF images (multi-frame supported)
- `image/jpeg` -- JPEG images
- `image/png` -- PNG images
- `image/bmp` -- BMP images
- `application/docx` -- Word documents
- `application/xlsx` -- Excel spreadsheets
- `application/pptx` -- PowerPoint presentations
- `text/plain` -- Plain text files
- `message/rfc822` -- Email messages (EML)
**Failure Reasons**:
- `invalid_mimetype` -- Unrecognized or unsupported content type
- `invalid_read` -- Could not read document content
- `invalid_read_pages` -- Could not read individual pages
- `zero_page_count` -- Document has no pages/sheets/slides
- `large_file` -- File exceeds size limit (500MB for images/Office, 100MB for text/email)
- `small_dimensions` / `large_dimensions` -- Image dimensions outside acceptable range
- `small_dpi` / `large_dpi` -- Image resolution outside acceptable range (min 72 DPI)
- `password_protected` -- Document is encrypted or password-protected (DOCX, XLSX, PPTX, OLE2)
- `contains_macros` -- Document contains VBA macros (DOCX, XLSX, PPTX)
- `empty_content` -- Document has no meaningful content (blank images, empty text)
- `binary_content` -- Text file contains binary data (null bytes)
- `unsupported_encoding` -- Text file uses an unsupported character encoding
- `contains_attachments` -- Email contains MIME attachments (only plain text emails accepted)
#### Document Clean Entries (`documentCleanEntries`)
Version tracking for clean operations.