PHPackages                             rodrigonull/verot-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. [File &amp; Storage](/categories/file-storage)
4. /
5. rodrigonull/verot-upload

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

rodrigonull/verot-upload
========================

This PHP script uploads by Verot

050PHP

Since Mar 25Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rodrigonull/verot-upload)[ Packagist](https://packagist.org/packages/rodrigonull/verot-upload)[ RSS](/packages/rodrigonull-verot-upload/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Package of VEROT's Upload Class
===============================

[](#package-of-verots-upload-class)

This package is simply a copy of [Verot's PHP Upload class](http://www.verot.net/php_class_upload.htm).

### Usefull Links

[](#usefull-links)

- [class.upload.php page](http://www.verot.net/php_class_upload.htm)
- [class.upload.php downloads](http://www.verot.net/php_class_upload_download.htm)
- [class.upload.php documentation](http://www.verot.net/php_class_upload_docs.htm)
- [class.upload.php samples, a files uploading and images manipulation PHP class](http://www.verot.net/php_class_upload_samples.htm)
- [class.upload.php license](http://www.verot.net/php_class_upload_gpl.htm)

class.upload.php
----------------

[](#classuploadphp)

### What is it?

[](#what-is-it)

An example will be more useful than any blurb I can write :

```
```php
$foo = new Upload($_FILES['form_field']);
if ($foo->uploaded) {
    // save uploaded image with no changes
    $foo->Process('/home/user/files/');
    if ($foo->processed) {
        echo 'original image copied';
    } else {
        echo 'error : ' . $foo->error;
    }
    // save uploaded image with a new name
    $foo->file_new_name_body = 'foo';
    $foo->Process('/home/user/files/');
    if ($foo->processed) {
    echo 'image renamed "foo" copied';
    } else {
    echo 'error : ' . $foo->error;
    }
    // save uploaded image with a new name,
    // resized to 100px wide
    $foo->file_new_name_body = 'image_resized';
    $foo->image_resize = true;
    $foo->image_convert = gif;
    $foo->image_x = 100;
    $foo->image_ratio_y = true;
    $foo->Process('/home/user/files/');
    if ($foo->processed) {
        echo 'image renamed, resized x=100
              and converted to GIF';
        $foo->Clean();
    } else {
        echo 'error : ' . $foo->error;
    }
}
```

```

### What does it actually do in this example?

[](#what-does-it-actually-do-in-this-example)

This example uses a file uploaded via a form. With this single file, it will :

- copy the file without any modification
- copy the file after having changed its name to 'foo'
- copy the file, resizing it to x=100, y=auto, converting it to GIF

### How does it work?

[](#how-does-it-work)

- the class constructor *upload* handles a uploaded file (it can also handle a local file)
- some optional parameters can be set up to act on the file during the *process*
- the process is called with as an argument the destination directory on the server. If some parameters have been set up, the class will rename, resize, convert files and images
- when the uploaded file is not needed anymore, we can delete it using *clean*.

### Why use this class?

[](#why-use-this-class)

- with one uploaded file, you can do as many copies, convertions, resizing you want.
- you can resize each image dimension, or both, keeping the image ratio or not.
- you can choose to resize an image only if it is bigger -or smaller- than the wanted sizes
- you can manipulate the image in many ways, play with colors, add borders, labels and watermarks...
- its use is simplistic but powerful
- you can work on uploaded files or local files, useful for batch processing
- Flash uploaders are fully supported
- MIME type detection is very comprehensive
- more than 60 documented configuration settings
- a lot of variables are set up during the process. You can retrieve all these values after a process.
- error messages are understandable, and a variable log allows you to see what the class does.
- it is translated in more than 25 languages
- it is already widely used on Internet
- it is free :)

### Is it out there on Internet?

[](#is-it-out-there-on-internet)

The class.upload.php source code has been downloaded well over **100 000 times** just in the last three years. It is also a key part of the popular [K2 content component for Joomla!](http://getk2.org/), downloaded over **500 000 times**, and has been implemented in numerous CMS and frameworks!

class.upload.php is featured on [HotScripts](http://www.hotscripts.com/). If you like the script, please rate it or write a review for it. You can find it [here](http://www.hotscripts.com/Detailed/45364.html).

class.upload.php is featured on [PHP Classes](http://www.phpclasses.org/). If you like the script, please rate it there. You can find it [here](http://www.phpclasses.org/browse/package/2181.html).

class.upload.php is featured on [Freshmeat](http://freshmeat.net/). If you like the script, please rate it there. You can find it [here](http://freshmeat.net/projects/class_upload_php/).

### Commercial licenses

[](#commercial-licenses)

[Commercial licenses](http://www.verot.net/php_class_upload_license.htm) are available [here](http://www.verot.net/php_class_upload_license.htm).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ed57465ca3304bbfde90f86796ee01e91ec862d234300b783253ba50273bbc3?d=identicon)[rodrigonull](/maintainers/rodrigonull)

---

Top Contributors

[![clemblanco](https://avatars.githubusercontent.com/u/668419?v=4)](https://github.com/clemblanco "clemblanco (6 commits)")[![rodrigonull](https://avatars.githubusercontent.com/u/3134877?v=4)](https://github.com/rodrigonull "rodrigonull (5 commits)")[![stephandesouza](https://avatars.githubusercontent.com/u/159077?v=4)](https://github.com/stephandesouza "stephandesouza (3 commits)")[![Ouark](https://avatars.githubusercontent.com/u/119316?v=4)](https://github.com/Ouark "Ouark (1 commits)")

### Embed Badge

![Health badge](/badges/rodrigonull-verot-upload/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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