PHPackages                             eeshiro/file-upload - 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. eeshiro/file-upload

ActiveLibrary

eeshiro/file-upload
===================

Simple File uploading library capable of handling multiple file uploads

1.0.0(5y ago)010MITPHPPHP &gt;=5.6.0

Since Mar 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/eeshiro/file-upload)[ Packagist](https://packagist.org/packages/eeshiro/file-upload)[ Docs](https://github.com/eeshiro/file-upload)[ RSS](/packages/eeshiro-file-upload/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

FileUpload
==========

[](#fileupload)

Simple File uploading library capable of handling multiple file uploads

Installing Add file to Composer.json file:

```
{
  "require": {
    "eeshiro/file-upload": "~1.0.0"
  }
}
```

or

`composer require eeshiro/file-upload`

Usage
=====

[](#usage)

```
require './vendor/autoload.php';

$upload = new FileUpload;
$single_file = $upload->validate('single_file', 'Single File')
				->required()
				->single()
				->max_size(2)
				->get();

$multiple_file= $upload->validate('multiple_file', 'Multiple File')
				->required()
				->multiple()
				->max_size(2, 'MB')
				->max_file(3)
				->get();

if($upload->has_error()){
	echo $upload->get_errors('');
	die();
}

$upload->move_uploaded_file($single_file, 'directory/filename.txt');

foreach ($multiple_file as $key => $file) {
	$upload->move_uploaded_file($file, 'directory/'.$file['name']);
}
```

Rules and Methods Reference
===========================

[](#rules-and-methods-reference)

   Rule Parameter Description Example     require No Returns FALSE if the form element is empty.    single No Returns FALSE if file upload type multiple.    multiple No Returns FALSE if file upload type single.    max\_file Yes Returns FALSE if file count is greater than maximum number of files specified. max\_file(5)   min\_file Yes Returns FALSE if file count is less than minimum number of files specified. min\_file(2)   image No Returns FALSE if uploaded file is not an image.    exist Yes Returns FALSE if file already exist on the directory. exist(directory)   min\_size Yes Returns FALSE file size is under the minimum size specified. Parameter 1 : size (Integer). Parameter 2 : size Type (String) Available size type (KB, MB, GB, TB)  min\_size(2, 'MB')   max\_size Yes Returns FALSE if file exceeds the maximum size specified. Parameter 1 : size (Integer). Parameter 2 : size Type (String) Available size type (KB, MB, GB, TB)  min\_size(2, 'MB')   valid\_format Yes Returns FALSE if file format is not in the list specified. Parameter 1 : file type list (Array)  valid\_format(\['jpg', 'png', 'gif'\])   move Yes Moves the validated file to the directory specified. Returns TRUE if successfully saved, FALSE if not. Parameter 1 : directory (String). Parameter 2 : use original filename (Boolean) (true if retain, false if not).  move('directory/filename.txt', false)   get No Returns the file validated.     has\_error Yes Returns TRUE if validation has error. Parameter 1: file index / file field name (String). NOT REQUIRED.     error\_count Yes Returns NUMBER of errors on validation. Parameter 1: file index / file field name (String). NOT REQUIRED.     get\_errors Yes Return validation errors. Parameter 1: glue (String) (If NULL returns array of errors). Parameter 1: file index / file field name (String) (NOT required).  get\_errors('
')   move\_uploaded\_file Yes Moves the file to the directory specified. Parameter 1 : File from get method (Array). Parameter 2 : File directory.  move\_uploaded\_file($file, 'directory/'.$file\['name'\])

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1900d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5409a9ee28641de28e75d477a53bad836b63f36329b770be1dcfba70820b1654?d=identicon)[eeshiro](/maintainers/eeshiro)

---

Top Contributors

[![eeshiro](https://avatars.githubusercontent.com/u/79953885?v=4)](https://github.com/eeshiro "eeshiro (6 commits)")

---

Tags

decimal-to-wordmoney-words

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eeshiro-file-upload/health.svg)

```
[![Health](https://phpackages.com/badges/eeshiro-file-upload/health.svg)](https://phpackages.com/packages/eeshiro-file-upload)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
