diff --git a/README.md b/README.md index 2067ca5..db7e9e6 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,12 @@ npm run dev - ✅ **Multi-Notebook Management** - Organize documents into collections - ✅ **6 AI Models** - GPT-5, Claude 4.5, Gemini 2.5 Pro, GPT-4o, Gemini Flash, GPT-4 - ✅ **Pricing Display** - See costs for each model -- ✅ **Multi-Document Upload** - Upload 1-20 PDFs per notebook +- ✅ **Multi-Document Upload** - Upload 1-20 files per notebook + - Documents: PDF, Word, PowerPoint, RTF, EPUB, Pages, Keynote, TXT, MD + - Spreadsheets: Excel, CSV, TSV, Numbers + - Images: JPG, PNG, GIF, BMP, TIFF, SVG (with OCR) + - Audio: MP3, WAV, M4A (transcription, 20MB limit) + - Web: HTML - ✅ **Background Processing** - Non-blocking document analysis - ✅ **Real-time Status** - Watch processing progress @@ -311,11 +316,16 @@ UPDATE users SET is_admin = true WHERE email = 'your@email.com'; **Upload Documents:** 1. Open your notebook -2. Click "Select PDF Files" -3. Choose 1-20 PDFs +2. Click "Select Files" +3. Choose 1-20 files (supports 30+ formats): + - Documents: PDF, DOCX, PPTX, RTF, EPUB, TXT, MD, and more + - Spreadsheets: XLSX, CSV, TSV + - Images: JPG, PNG (with OCR) + - Audio: MP3, WAV (with transcription, 20MB limit) + - Web: HTML 4. Click "Upload X File(s)" -5. Wait ~1 minute per document for processing -6. Expand documents to see summaries, highlights, Q&A +5. Wait ~1 minute per file for processing +6. Expand files to see summaries, highlights, Q&A **Generate Cross-Document Analysis:** 1. Click "Cross-Doc Analysis" button @@ -562,7 +572,7 @@ curl -X PUT "http://localhost:9000/api/admin/users/USER_ID/role?is_admin=true&re - **Role-Based Access:** Admin-only pages - **CORS:** Configured for localhost:4000 - **SQL Injection Protection:** SQLAlchemy ORM -- **File Validation:** PDF-only uploads +- **File Validation:** 30+ file types supported (documents, spreadsheets, images, audio, web) - **Permission System:** Granular notebook sharing --- diff --git a/backend/src/api/routes/documents.py b/backend/src/api/routes/documents.py index 63576d4..ea11454 100644 --- a/backend/src/api/routes/documents.py +++ b/backend/src/api/routes/documents.py @@ -52,10 +52,22 @@ async def upload_document( if not notebook: raise HTTPException(status_code=404, detail="Notebook not found") - # Validate file type - supported_extensions = ('.pdf', '.docx', '.doc', '.pptx', '.ppt', '.txt', '.md') + # Validate file type - LlamaParse supports all these formats + supported_extensions = ( + # Documents + '.pdf', '.docx', '.doc', '.pptx', '.ppt', '.txt', '.md', '.rtf', '.epub', + '.pages', '.key', '.odt', '.odp', + # Spreadsheets + '.xlsx', '.xls', '.xlsm', '.xlsb', '.csv', '.tsv', '.numbers', '.ods', + # Images (OCR) + '.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp', '.svg', + # Web + '.html', '.htm', + # Audio (transcription, 20MB limit) + '.mp3', '.mp4', '.mpeg', '.m4a', '.wav', '.webm' + ) if not file.filename.lower().endswith(supported_extensions): - raise HTTPException(status_code=400, detail="Supported file types: PDF, DOCX, DOC, PPTX, PPT, TXT, MD") + raise HTTPException(status_code=400, detail="Unsupported file type. See upload page for supported formats.") try: # Save to temporary file diff --git a/frontend/src/app/notebooks/[id]/page.tsx b/frontend/src/app/notebooks/[id]/page.tsx index d9570b3..a16d6a9 100644 --- a/frontend/src/app/notebooks/[id]/page.tsx +++ b/frontend/src/app/notebooks/[id]/page.tsx @@ -167,14 +167,26 @@ export default function NotebookDetailPage() { const files = e.target.files; if (!files) return; - const supportedExtensions = ['.pdf', '.docx', '.doc', '.pptx', '.ppt', '.txt', '.md']; + const supportedExtensions = [ + // Documents + '.pdf', '.docx', '.doc', '.pptx', '.ppt', '.txt', '.md', '.rtf', '.epub', + '.pages', '.key', '.odt', '.odp', + // Spreadsheets + '.xlsx', '.xls', '.xlsm', '.xlsb', '.csv', '.tsv', '.numbers', '.ods', + // Images (OCR) + '.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp', '.svg', + // Web + '.html', '.htm', + // Audio (transcription) + '.mp3', '.mp4', '.mpeg', '.m4a', '.wav', '.webm' + ]; const validFiles = Array.from(files).filter(file => { const fileName = file.name.toLowerCase(); return supportedExtensions.some(ext => fileName.endsWith(ext)); }); if (validFiles.length !== files.length) { - alert('Supported file types: PDF, DOCX, DOC, PPTX, PPT, TXT, MD'); + alert('Unsupported file type(s) detected.\n\nSupported formats:\n• Documents: PDF, DOCX, PPTX, RTF, EPUB, Pages, Keynote, TXT, MD\n• Spreadsheets: XLSX, XLS, CSV, TSV, Numbers\n• Images: JPG, PNG, GIF, BMP, TIFF, SVG (with OCR)\n• Web: HTML\n• Audio: MP3, WAV, M4A (transcription, 20MB limit)'); } if (validFiles.length > 20) { @@ -537,13 +549,16 @@ export default function NotebookDetailPage() {

- Upload documents: PDF, DOCX, PPTX, TXT, MD (up to 20 files) + Upload documents, spreadsheets, images, audio, or web pages (up to 20 files) +

+

+ Supports: PDF, Office (Word/Excel/PowerPoint), Images (JPG/PNG), Audio (MP3/WAV), CSV, HTML, and more