- Restrict file upload to PDF files only in frontend and backend
- Add comprehensive PDF MIME type validation
- Remove duplicate processing view and URL endpoint
- Update model help text and UI labels for PDF-only
- Clean up unused imports and code references
- Maintain rich results formatting with HTML rendering
- Preserve all existing webhook processing functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Issue Fixed
- Data analyzer was returning HTML instead of JSON for AJAX requests
- JavaScript was receiving "<\!DOCTYPE..." instead of valid JSON
- SyntaxError: Unexpected token '<' in JSON parsing
## Solution
- Modified data_analyzer_detail view to handle AJAX POST requests
- Added proper X-Requested-With header detection
- Integrated form processing directly in detail view
- Added data_analyzer_status view for polling mechanism
- Updated URL configuration with status endpoint
## Technical Changes
- Handle multipart form data for file uploads in detail view
- Return proper JsonResponse for AJAX requests
- Maintain wallet balance checking and deduction logic
- Use 'analysisType' field name to match frontend form
- Add status polling URL pattern for consistent API
## Result
- Data analyzer now properly returns JSON responses
- Form submission works without page reload
- Consistent with other working agents (weather, job posting, social ads)
- Proper error handling and user feedback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>