Skip to content

Add multipart file upload endpoint for more efficient CV analysis#5

Merged
coolbung merged 1 commit intomainfrom
claude/frappe-hrms-cv-upload-011CV5La1ED2RTd2Ycx4vWcQ
Nov 14, 2025
Merged

Add multipart file upload endpoint for more efficient CV analysis#5
coolbung merged 1 commit intomainfrom
claude/frappe-hrms-cv-upload-011CV5La1ED2RTd2Ycx4vWcQ

Conversation

@coolbung
Copy link
Copy Markdown
Member

Added new /analyze-upload endpoint that accepts multipart/form-data:

Benefits over base64 endpoint:

  • 33% smaller payload (no base64 encoding overhead)
  • More memory efficient
  • Industry standard for file uploads
  • Better performance for large files

Features:

  • Direct file upload with multipart/form-data
  • JSON configuration in form fields
  • File type validation
  • Maintains backward compatibility (old endpoint still works)

Both endpoints now available:

  • POST /api/v1/analyze - Base64 JSON (existing, for Frappe integration)
  • POST /api/v1/analyze-upload - Multipart upload (new, more efficient)

Usage:
curl -X POST http://localhost:8000/api/v1/analyze-upload \ -F "cv_file=@cv.pdf" \ -F "position_framework={\role_title:\Engineer}" \ -F "company_criteria={\company_name:\ACME}" \ -F "llm_provider=auto"

Added new /analyze-upload endpoint that accepts multipart/form-data:

Benefits over base64 endpoint:
- 33% smaller payload (no base64 encoding overhead)
- More memory efficient
- Industry standard for file uploads
- Better performance for large files

Features:
- Direct file upload with multipart/form-data
- JSON configuration in form fields
- File type validation
- Maintains backward compatibility (old endpoint still works)

Both endpoints now available:
- POST /api/v1/analyze - Base64 JSON (existing, for Frappe integration)
- POST /api/v1/analyze-upload - Multipart upload (new, more efficient)

Usage:
  curl -X POST http://localhost:8000/api/v1/analyze-upload \
    -F "cv_file=@cv.pdf" \
    -F "position_framework={\role_title\:\Engineer\}" \
    -F "company_criteria={\company_name\:\ACME\}" \
    -F "llm_provider=auto"
@coolbung coolbung merged commit 9cbe68f into main Nov 14, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants