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 3mo 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

28

—

LowBetter than 54% of packages

Maintenance60

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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

619d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21f8c010ceb14fff8934b479704a1c597883b2ed507f4ee338c2ed91d2590797?d=identicon)[thizh](/maintainers/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

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)[azure-oss/storage-blob-laravel

Azure Storage Blob filesystem driver for Laravel

63582.2k1](/packages/azure-oss-storage-blob-laravel)[spatie/laravel-backup-server

Backup multiple applications

17016.7k1](/packages/spatie-laravel-backup-server)

PHPackages © 2026

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