Enhanced file sharing service with password protection, expiration dates, download limits, and thumbnail generation.
GitHub: https://github.com/MeherMankar/DropLy.git
- Password Protection: Secure files with custom passwords
- File Expiration: Auto-delete files after specified time
- Download Limits: Restrict number of downloads per file
- Enhanced Validation: Improved file type and size checking
- Thumbnail Generation: Automatic thumbnails for images
- File Preview: Visual preview before download
- Media Support: Enhanced support for images, videos, documents
- Download Tracking: Monitor file access patterns
- Expiration Monitoring: Track file lifecycle
- Usage Statistics: Detailed file usage metrics
# Upload with password protection
curl -X POST "http://localhost:8001/api/upload" \
-F "[email protected]" \
-F "password=secret123" \
-F "expires_in=7d" \
-F "max_downloads=5"
# Download with password
curl "http://localhost:8001/download/ABC123?password=secret123"
POST /api/upload
- Upload with password, expiration, limitspassword
(optional): Password protect the fileexpires_in
(optional): Auto-delete after time (1h, 2d, 1w)max_downloads
(optional): Limit downloads (0 = unlimited)
GET /thumbnails/{filename}
- Get file thumbnailGET /health
- System health checkGET /{file_code}
- Enhanced file page with security info
- Password Encryption: bcrypt hashed passwords
- Expiration Dates: Automatic cleanup of expired files
- Download Limits: Prevent excessive downloads
- Secure Access: Password validation before download
- Anonymous Uploads: No registration required
- Temporary Files: Auto-expiring content
- Access Control: Password-based restrictions
- Advanced Options Panel: Collapsible settings
- Real-time Validation: Instant feedback
- Progress Tracking: Visual upload progress
- Option Preview: See selected settings
- Thumbnail Display: Image previews
- Security Indicators: Password/limit status
- Expiration Warnings: Time remaining alerts
- Download Counter: Remaining downloads
# File Management
MAX_FILE_SIZE=52428800
DEFAULT_EXPIRATION=7d
MAX_DOWNLOADS_LIMIT=100
# Thumbnail Settings
THUMBNAIL_SIZE=200
THUMBNAIL_QUALITY=85
GENERATE_THUMBNAILS=true
# Cleanup Settings
CLEANUP_INTERVAL=3600 # 1 hour
AUTO_CLEANUP=true
version: '3.8'
services:
droply:
build: .
ports:
- "8001:8001"
volumes:
- ./api/files:/app/api/files
- ./api/thumbnails:/app/api/thumbnails
environment:
- GENERATE_THUMBNAILS=true
- AUTO_CLEANUP=true
# Add to crontab for automatic cleanup
0 * * * * cd /path/to/droply && python -m api.cleanup
const formData = new FormData();
formData.append('file', fileInput.files[0]);
// Simple upload - no restrictions
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('password', 'mySecret123');
formData.append('expires_in', '24h');
formData.append('max_downloads', '3');
// Protected upload with expiration and limits
const response = await fetch(`/download/${fileCode}?password=${password}`);
if (response.ok) {
// Download successful
} else if (response.status === 401) {
// Invalid password
} else if (response.status === 429) {
// Download limit reached
}
-- Add new columns to existing files table
ALTER TABLE files ADD COLUMN password_hash VARCHAR(255);
ALTER TABLE files ADD COLUMN expires_at TIMESTAMP;
ALTER TABLE files ADD COLUMN max_downloads INTEGER DEFAULT 0;
ALTER TABLE files ADD COLUMN download_count INTEGER DEFAULT 0;
ALTER TABLE files ADD COLUMN thumbnail_path VARCHAR(255);
api/
βββ files/ # Uploaded files
βββ thumbnails/ # Generated thumbnails
βββ templates/ # HTML templates
βββ cleanup.py # Cleanup script
- Thumbnail Caching: Efficient image processing
- Lazy Loading: On-demand thumbnail generation
- Background Cleanup: Automated file management
- Optimized Queries: Enhanced database performance
- Password Hashing: bcrypt with salt
- Input Validation: Enhanced file checking
- Access Logging: Detailed audit trails
- Rate Limiting: Prevent abuse
- Support: @Meher_Mankar
- API Docs:
/docs
(Swagger UI) - Health Check:
/health
- Version Info: Included in health endpoint
- Error Handling: Improved error messages
- User registration system
- File organization (folders)
- Bulk operations
- Advanced analytics dashboard
- Mobile applications
- Cloud storage integration