Download the PHP package farisc0de/phpfileuploading without Composer
On this page you can find all versions of the php package farisc0de/phpfileuploading. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download farisc0de/phpfileuploading
More information about farisc0de/phpfileuploading
Files in farisc0de/phpfileuploading
Download farisc0de/phpfileuploading
More information about farisc0de/phpfileuploading
Files in farisc0de/phpfileuploading
Vendor farisc0de
Package phpfileuploading
Short Description Production-ready PHP library for secure file uploads with validation, virus scanning, rate limiting, and cloud storage support.
License MIT
Homepage https://github.com/farisc0de/PhpFileUploading
Package phpfileuploading
Short Description Production-ready PHP library for secure file uploads with validation, virus scanning, rate limiting, and cloud storage support.
License MIT
Homepage https://github.com/farisc0de/PhpFileUploading
Please rate this library. Is it a good library?
Informations about the package phpfileuploading
PhpFileUploading
Production-ready PHP library for secure file uploads with validation, virus scanning, rate limiting, and cloud storage support.
Features
- Security First: MIME type validation, extension filtering, forbidden filename blocking, path traversal prevention
- Validation System: Chainable validators with detailed result objects
- Rate Limiting: Prevent abuse with configurable rate limiters (in-memory or file-based)
- Virus Scanning: ClamAV integration for malware detection
- Storage Abstraction: Local storage with Flysystem-compatible interface for cloud providers
- Event System: Hook into upload lifecycle with event listeners
- Image Processing: Resize, compress, watermark, and convert images
- Logging: PSR-3 compatible logging interface
- Multi-File Upload: Handle single and multiple file uploads
Requirements
- PHP 8.1 or higher
fileinfoextensionjsonextensiongdextension (for image processing)
Installation
Quick Start
Basic Upload
Using the Validation Chain
Rate Limiting
Virus Scanning
Event System
Storage Abstraction
Logging
Image Processing
Configuration
Filter Configuration (filter.json)
The library uses a JSON configuration file for extension/MIME mappings and size limits:
Exception Handling
The library provides specific exception types for different error scenarios:
Testing
Directory Structure
Security Best Practices
- Always validate file types using both extension and MIME type checking
- Use hashed filenames to prevent overwriting and path traversal
- Store uploads outside web root when possible
- Enable virus scanning in production environments
- Implement rate limiting to prevent abuse
- Set appropriate file permissions (0644 for files, 0755 for directories)
- Use HTTPS for file uploads
- Validate image dimensions to prevent resource exhaustion
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits
Developed by FarisCode
All versions of phpfileuploading with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
ext-fileinfo Version *
ext-json Version *
ext-fileinfo Version *
ext-json Version *
The package farisc0de/phpfileuploading contains the following files
Loading the files please wait ...