PHPackages                             almazik/laravel-uploader - 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. almazik/laravel-uploader

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

almazik/laravel-uploader
========================

A package that allows easily handle uploading files to your server from different sources.

0.2.5(10y ago)12.7k1MITPHPPHP &gt;=5.4.0

Since Nov 25Pushed 10y ago2 watchersCompare

[ Source](https://github.com/pricecurrent/LaravelUploader)[ Packagist](https://packagist.org/packages/almazik/laravel-uploader)[ Docs](https://github.com/pricecurrent/LaravelUploader)[ RSS](/packages/almazik-laravel-uploader/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

Laravel Uploader.
=================

[](#laravel-uploader)

If you're anything like me, you probably find yourself facing that you need to tacke file uploading from app to app, and you just manually wright things over and over again. Should this be repetitive? ***No***.

Instead, delegate this job to package which has only responsibility - uploading files.

Install
-------

[](#install)

Pull this package in through Composer.

```
{
    "require": {
        "almazik/laravel-uploader": "dev-master"
    }
}
```

Then you'll need to reference the Service Provider Class. Insert this line into your `config/app.php` file, just append to `providers` array.

```
Almazik\LaravelUploader\FileUploaderServiceProvider::class,
```

For your convinience, you might also want to reference the facade.

```
'Uploader' => Almazik\LaravelUploader\Facades\Uploader::class,
```

Usage
-----

[](#usage)

Let's assume we have a form for uploading a file, and controller's method to handle when it posts to it.

Here's an example.

```
use Uploader;
use Illuminate\Http\Request;

class SomeController extends Controller {

    public function upload(Request $request)
    {
        Uploader::file($request->file('file'));
        Uploader::push('path/where/to/save');
    }
}
```

If you don't want to use facade, use dependency injection:

```
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Almazik\LaravelUploader\Contracts\Uploader;

class SomeController extends Controller
{
    protected $uploader;

    public function __construct(Uploader $uploader)
    {
        $this->uploader = $uploader;
    }

    public function upload(Request $request)
    {
        $this->uploader
            ->file($request->file('file'))
            ->push('path/to/store/file');
    }
}
```

You can chain methods.

### Input Sources

[](#input-sources)

Currently package supports 2 input types: files uploaded through the form (as described above) and base64\_encoded version of the file.

Imaging that you integrating some kind of third party api that would send you files in base64\_encoded format. Easy enough:

```
class SomeController extends Controller
{
    protected $uploader;

    public function __construct(Uploader $uploader)
    {
        $this->uploader = $uploader;
    }

    public function upload(Request $request)
    {
        $encoded = $this->someService->getBase64Encoded();

        $this->uploader
            ->file($encoded)
            ->filename('foobar.jpg')
            ->push('path/to/store/file');
    }
}
```

Just notice that in this case you'll likely want to explicitly tell the filename to use as the package itself will try to lookup the given file mime-type and associate it with extension, but this doesn't work 100% of the times as not every mime-type has a fixed extension.

Destination
-----------

[](#destination)

The package uses Laravel's filesystem, so it has built in support for all drivers as Laravel does: local, s3, ftp, rackspace.

Be sure to check configs in `config/filesystem.php` to set up the path where your files will be uploaded.

For example, let's assume in your `config/filesystem.php` your default driver set to s3.

```
'default' => 's3',

'disks' => [
    's3' => [
        'driver' => 's3',
        'key'    => env('S3_KEY'),
        'secret' => env('S3_SECRET'),
        'region' => env('S3_REGION'),
        'bucket' => env('S3_BUCKET'),
    ],
]
```

With these settings along, your file will be uploaded to your bucket being as the root and path that was passed in as an argument to push method.

FileNames
---------

[](#filenames)

By default, file will be uploaded with the original file name, being prefixed with the current timestamps and all whitespaces being replaced with underscores. If you want to override this, you can do this before calling the `push` method

```
Uploader::filename('foo.png');
```

Persisting
----------

[](#persisting)

After uploading a file, you'll probably want to save the path to the DB, right? No probs, after uploading the file, just get the full path like this

```
$fullPath = Uploader::getFullPath();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Every ~22 days

Total

6

Last Release

3709d ago

PHP version history (2 changes)0.1.1PHP &gt;=5.3.0

0.2.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec038e084e007d94bbf086ec259069dcb714aee05b838ff3914814efca7067d4?d=identicon)[AndrewAlmazik](/maintainers/AndrewAlmazik)

---

Top Contributors

[![pricecurrent](https://avatars.githubusercontent.com/u/4919983?v=4)](https://github.com/pricecurrent "pricecurrent (16 commits)")

### Embed Badge

![Health badge](/badges/almazik-laravel-uploader/health.svg)

```
[![Health](https://phpackages.com/badges/almazik-laravel-uploader/health.svg)](https://phpackages.com/packages/almazik-laravel-uploader)
```

###  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.8M125](/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.7M62](/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)
