PHPackages                             farisc0de/phpfileuploading - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. farisc0de/phpfileuploading

ActiveLibrary[File &amp; Storage](/categories/file-storage)

farisc0de/phpfileuploading
==========================

Production-ready PHP library for secure file uploads with validation, virus scanning, rate limiting, and cloud storage support.

v3.2.4(2mo ago)1661MITPHPPHP &gt;=8.1

Since Jun 12Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/farisc0de/PhpFileUploading)[ Packagist](https://packagist.org/packages/farisc0de/phpfileuploading)[ Docs](https://github.com/farisc0de/PhpFileUploading)[ RSS](/packages/farisc0de-phpfileuploading/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (26)Used By (0)

PhpFileUploading
================

[](#phpfileuploading)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)](https://php.net)

Production-ready PHP library for secure file uploads with validation, virus scanning, rate limiting, and cloud storage support.

Features
--------

[](#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
------------

[](#requirements)

- PHP 8.1 or higher
- `fileinfo` extension
- `json` extension
- `gd` extension (for image processing)

Installation
------------

[](#installation)

```
composer require farisc0de/phpfileuploading
```

Quick Start
-----------

[](#quick-start)

### Basic Upload

[](#basic-upload)

```
