A web application that allows users to upload PDF files and generate QR codes that link directly to the PDFs. When someone scans the QR code, they can view the PDF directly in their browser.
- 📄 Upload PDF files (up to 10MB)
- 🔗 Generate QR codes that link to your PDFs
- 📱 Mobile-friendly responsive design
- 🎨 Modern, beautiful UI
- 🔒 Secure file handling with unique IDs
- 📊 File metadata tracking
- Upload: User uploads a PDF file through the web interface
- Generate: System creates a unique QR code that contains a direct link to the PDF
- Share: User can share the QR code with others
- View: When someone scans the QR code, they're taken directly to view the PDF
- Make sure you have Node.js installed on your system
- Navigate to the project directory
- Install dependencies:
npm install
-
Start the server:
npm start
-
Open your browser and go to:
http://localhost:3000 -
Upload a PDF file by:
- Clicking the upload area and selecting a file, or
- Dragging and dropping a PDF file onto the upload area
-
Click "Generate QR Code" to create your QR code
-
Download the QR code or share the PDF link directly
GET /- Main application interfacePOST /upload- Upload PDF and generate QR codeGET /view/:fileId- View PDF by file IDGET /info/:fileId- Get file metadata
├── server.js # Main server file
├── package.json # Dependencies and scripts
├── public/
│ └── index.html # Frontend interface
├── uploads/ # Directory for uploaded PDFs (created automatically)
└── README.md # This file
- Backend: Node.js with Express
- File Upload: Multer for handling file uploads
- QR Code Generation: qrcode library
- File Storage: Local filesystem with unique UUIDs
- Frontend: Vanilla HTML, CSS, and JavaScript
- File type validation (PDF only)
- File size limits (10MB maximum)
- Unique file IDs to prevent unauthorized access
- Secure file serving with proper headers
- Modern browsers with ES6+ support
- Mobile responsive design
- Works on both desktop and mobile devices
To run in development mode with auto-restart:
npm run dev- Uploaded files are stored in the
uploads/directory - Each file gets a unique UUID to prevent conflicts
- The application runs on port 3000 by default
- QR codes contain direct links to view the PDFs
- Make sure port 3000 is not in use by another application
- Check that Node.js and npm are properly installed
- Ensure you have write permissions in the project directory
- For large files, ensure sufficient disk space is available