LibreChat/packages/api/src/files/encode
Dustin Healy 1d0a4c501f
🪨 feat: AWS Bedrock Document Uploads (#11912)
* feat: add aws bedrock upload to provider support

* chore: address copilot comments

* feat: add shared Bedrock document format types and MIME mapping

Bedrock Converse API accepts 9 document formats beyond PDF. Add
BedrockDocumentFormat union type, MIME-to-format mapping, and helpers
in data-provider so both client and backend can reference them.

* refactor: generalize Bedrock PDF validation to support all document types

Rename validateBedrockPdf to validateBedrockDocument with MIME-aware
logic: 4.5MB hard limit applies to all types, PDF header check only
runs for application/pdf. Adds test coverage for non-PDF documents.

* feat: support all Bedrock document formats in encoding pipeline

Widen file type gates to accept csv, doc, docx, xls, xlsx, html, txt,
md for Bedrock. Uses shared MIME-to-format map instead of hardcoded
'pdf'. Other providers' PDF-only paths remain unchanged.

* feat: expand Bedrock file upload UI to accept all document types

Add 'image_document_extended' upload type for Bedrock with accept
filters for all 9 supported formats. Update drag-and-drop validation
to use isBedrockDocumentType helper.

* fix: route Bedrock document types through provider pipeline
2026-02-23 22:32:44 -05:00
..
audio.ts 🎞️ feat: OpenRouter Audio/Video File Upload Support (#11070) 2025-12-25 13:23:29 -05:00
document.spec.ts 🪨 feat: AWS Bedrock Document Uploads (#11912) 2026-02-23 22:32:44 -05:00
document.ts 🪨 feat: AWS Bedrock Document Uploads (#11912) 2026-02-23 22:32:44 -05:00
index.ts 📎 feat: Direct Provider Attachment Support for Multimodal Content (#9994) 2025-10-06 17:30:16 -04:00
utils.ts 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00
video.ts 🎞️ feat: OpenRouter Audio/Video File Upload Support (#11070) 2025-12-25 13:23:29 -05:00