A complete web application for uploading PDF files to Cloudinary with resume parsing and ATS score analysis.
- π PDF file upload with drag & drop support
- π¨ Modern and responsive UI design
- π Real-time upload progress
- π File type and size validation (max 10MB)
- βοΈ Secure upload to Cloudinary
- π± Mobile-friendly interface
- β¨ Beautiful animations and transitions
- π Resume parsing and data extraction
- π§ ATS score analysis
- π‘ Resume improvement suggestions
cd cloud_upload_modulenpm install- Sign up for a free account at Cloudinary
- Copy
.env.exampleto.env:copy .env.example .env
- Edit
.envfile with your Cloudinary credentials:CLOUDINARY_CLOUD_NAME=your_actual_cloud_name CLOUDINARY_API_KEY=your_actual_api_key CLOUDINARY_API_SECRET=your_actual_api_secret
npm startOr for development with auto-restart:
npm testOpen your browser and navigate to: http://localhost:3000
cloud_upload_module/
βββ public/
β βββ index.html # Frontend interface
βββ server.js # Backend Express server
βββ package.json # Dependencies and scripts
βββ .env.example # Environment variables template
βββ README.md # This file
Upload a PDF file to Cloudinary and extract resume data.
Request:
- Method: POST
- Content-Type: multipart/form-data
- Body: PDF file with field name 'pdf'
Response:
{
"success": true,
"message": "PDF uploaded successfully",
"data": {
"public_id": "pdf_uploads/sample_pdf",
"secure_url": "https://res.cloudinary.com/...",
"direct_pdf_url": "https://res.cloudinary.com/...",
"cloudinary_url": "https://res.cloudinary.com/...",
"download_url": "https://res.cloudinary.com/...",
"local_view_url": "http://localhost:3000/view-pdf?id=...",
"ats_score_url": "http://localhost:3000/ats-score?id=...",
"resume_analyzed": true,
"analysis_id": 1,
"original_filename": "document.pdf",
"file_size": 1024000,
"upload_time": "2025-06-14T10:30:00.000Z",
"compression": {
"original_size": 1048576,
"compressed_size": 1024000,
"ratio": "2.34"
}
}
}View the ATS score analysis page for a resume.
Query Parameters:
id: The public ID of the uploaded PDF
Get the ATS score data for a resume.
Path Parameters:
id: The public ID of the uploaded PDF
Response:
{
"success": true,
"data": {
"publicId": "pdf_uploads/sample_pdf",
"filename": "resume.pdf",
"timestamp": "2025-06-14T10:30:00.000Z",
"score": 85,
"breakdown": {
"skills": {
"count": 8,
"items": ["javascript", "react", "node.js", ...],
"score": 35,
"maxScore": 40
},
"education": {
"count": 2,
"items": [
{ "degree": "bachelor of computer science", "year": "2022" },
{ "degree": "master of computer science", "year": "2024" }
],
"score": 20,
"maxScore": 30
},
"experience": {
"count": 3,
"items": [
{ "title": "software developer at abc corp", "duration": "2 years" },
{ "title": "intern at xyz inc", "duration": "6 months" },
{ "title": "freelance web developer", "duration": "1 year" }
],
"score": 30,
"maxScore": 30
}
},
"suggestions": [
"Consider adding more relevant skills to your resume.",
"Your education section looks good!"
]
}
}- Drag & Drop: Simply drag PDF files onto the upload area
- File Validation: Automatically validates file type and size
- Progress Tracking: Visual progress bar during upload
- Responsive Design: Works on desktop, tablet, and mobile
- Error Handling: Clear error messages for various scenarios
- Success Details: Shows complete file information after upload
- File Upload Handling: Uses Multer middleware for file processing
- Cloudinary Integration: Secure upload to cloud storage
- Error Handling: Comprehensive error handling and validation
- CORS Support: Allows cross-origin requests
- Environment Variables: Secure credential management
- File Type: Only PDF files are accepted
- File Size: Maximum 10MB per file
- File Format: Must be a valid PDF document
The application handles various error scenarios:
- Invalid file types
- Files exceeding size limits
- Network connectivity issues
- Cloudinary upload failures
- Missing environment variables
- File type validation on both frontend and backend
- File size limits to prevent abuse
- Environment variables for sensitive credentials
- CORS configuration for secure cross-origin requests
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Mobile browsers
- Upload fails: Check your Cloudinary credentials in
.envfile - File not accepted: Ensure the file is a valid PDF under 10MB
- Server won't start: Make sure port 3000 is available
- Environment variables: Ensure
.envfile exists and has correct values
For development, use:
npm testThis uses nodemon for automatic server restart on file changes.
ISC License - See package.json for details.
Het-Patel
For issues or questions, please check the console for error messages and ensure all setup steps are completed correctly.