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

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

khodja/upload
=============

File upload and thumbnail management package for laravel 5.\*

v1.4(7y ago)21.1kMITPHPPHP &gt;=5.4.0

Since Jul 5Pushed 7y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

File upload for Laravel
=======================

[](#file-upload-for-laravel)

Requirements
------------

[](#requirements)

- PHP &gt;=5.4
- [Intervention Image](https://github.com/Intervention/image)

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

[](#installation)

Require this package with composer:

```
composer require khodja/upload

```

In Laravel 5.5, the service provider and facade will automatically get registered. For older versions of the framework, follow the steps below:

Register the provider directly in your app configuration file config/app.php

```
'providers' => [
    // ...
    Intervention\Image\ImageServiceProvider::class,
    Khodja\Upload\UploadServiceProvider::class,
];
```

Add the facade aliases in the same file:

```
'aliases' => [
    ...
    'Upload' => Khodja\Upload\Facades\Upload::class
];
```

### Package Configuration

[](#package-configuration)

Publish configuration

```
php artisan vendor:publish --provider="Khodja\Upload\UploadServiceProvider"

```

Methods
-------

[](#methods)

- `getFile($catalog, $id)`: Get the path to the file.
- `getFiles($catalog, $id [, $filter])`: Get the path to the files.
- `saveFile($catalog, $id, $file [, $options])`: Save file.
- `saveFiles($catalog, $id, $files [, $options])`: Save files.
- `swapFirst($catalog, $id, $i)`: Swap the first file with given file by index.
- `getImage($catalog, $id [, $class=''])`: Get image tag with source.
- `getThumbImage($catalog, $id, $size [, $class=''])`: Get thumb image tag.
- `getThumbFile($catalog, $id, $size)`: Generate path for a thumb image.
- `getThumbFiles($catalog, $id, $size)`: Get all thumb files path.
- `hasFile($catalog, $id)`: Whether the file contains a catalog folder.
- `hasFiles($catalog, $id)`: Whether the files contains a catalog folder.
- `removeFile($catalog, $id)`: Remove file.
- `removeFiles($catalog, $id [, $file_names])`: Remove files.

Code example
------------

[](#code-example)

Usage inside a laravel route

```
Route::get('/post-image/{id}', function($id)
{
    return Upload::getImage('image', $id);
});
```

Support
-------

[](#support)

Feel free to post your issues in the issues section.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

This library is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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

Every ~124 days

Total

5

Last Release

2743d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46393d04fd6fb911ac202fb9e0111ac2af3eb30c9fedc4894223afde3a4e84ec?d=identicon)[Fayzulla](/maintainers/Fayzulla)

---

Top Contributors

[![Fayzulla](https://avatars.githubusercontent.com/u/9434260?v=4)](https://github.com/Fayzulla "Fayzulla (10 commits)")[![FayzullaKhodja](https://avatars.githubusercontent.com/u/11515038?v=4)](https://github.com/FayzullaKhodja "FayzullaKhodja (4 commits)")

---

Tags

laravelupload

### Embed Badge

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

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

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[barryvdh/elfinder-flysystem-driver

A Flysystem Driver for elFinder

1864.7M31](/packages/barryvdh-elfinder-flysystem-driver)[itskodinger/midia

Simple Media manager for your Laravel project

1415.8k](/packages/itskodinger-midia)[jeremytubbs/deepzoom

Deepzoom Tile Generator for OpenSeadragon

5018.7k2](/packages/jeremytubbs-deepzoom)[farhanshares/laravel-mediaman

MediaMan - The most elegant &amp; powerful media management package for Laravel!

293.7k](/packages/farhanshares-laravel-mediaman)[xefi/faker-php-images

Faker extension to generate images

402.6k](/packages/xefi-faker-php-images)

PHPackages © 2026

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