PHPackages                             gpit/fileuploader - 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. gpit/fileuploader

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

gpit/fileuploader
=================

v0.03(1y ago)012PHPPHP ^8.0

Since Sep 5Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Gpitio/fileuploader)[ Packagist](https://packagist.org/packages/gpit/fileuploader)[ RSS](/packages/gpit-fileuploader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

fileuploader
============

[](#fileuploader)

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

[](#installation)

You can install the package via Composer.

```
composer require gpit/fileuploader
```

Basic Usage Example
-------------------

[](#basic-usage-example)

```
use gpit\fileuploader\FileUploader;
use Illuminate\Http\Request;

class ProfileController extends Controller
{
    /**
     * Upload a profile image.
     *
     * @param \Illuminate\Http\Request $req
     * @return array
     */
    public function profileImg(Request $req)
    {
        // Optional custom path
        $customPath = 'profile/images';

        // Use FileUploader with the custom path
        $result = FileUploader::uploadFile($req, $customPath);

        if ($result[0]) {
            return ['success' => true, 'path' => $result['path']];
        } else {
            return ['success' => false, 'error' => $result['error']];
        }
    }
}
```

Request Example
---------------

[](#request-example)

### Example Request Payload:

[](#example-request-payload)

```
{
    "name": "avatar.png",
    "file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
```

Default Path
------------

[](#default-path)

If no custom path is provided, the default upload path is files/. You can override this by passing a second argument to the uploadFile method:

```
    $customPath = 'profile/images';
    FileUploader::uploadFile($request, $customPath); // Files will be uploaded to 'profile/images/'
```

If you don't pass the custom path, files will be stored in the files/ directory by default:

```
    FileUploader::uploadFile($request); // Files will be uploaded to 'files/'
```

Return Values
-------------

[](#return-values)

The uploadFile method returns an array with either the success status and path, or an error message in case of failure.

### On Success:

[](#on-success)

```
    [true, 'path' => 'profile/images/avatar.png']
```

### On Failure:

[](#on-failure)

```
    [false, 'error' => 'Error message here']
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance55

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~0 days

Total

3

Last Release

664d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/70251552?v=4)[Thizh Wick](/maintainers/thizh)[@Thizh](https://github.com/Thizh)

---

Top Contributors

[![thizhw](https://avatars.githubusercontent.com/u/164291576?v=4)](https://github.com/thizhw "thizhw (30 commits)")

### Embed Badge

![Health badge](/badges/gpit-fileuploader/health.svg)

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

###  Alternatives

[unisharp/laravel-filemanager

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

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[illuminate/filesystem

The Illuminate Filesystem package.

15263.8M3.1k](/packages/illuminate-filesystem)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)

PHPackages © 2026

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