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

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

sdtech/file-uploader-laravel
============================

Simple library to upload image and file with validation

v1.0.9(3mo ago)02.1kMITPHPPHP ^8.0

Since Jul 15Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/syedbacchu/file-uploader-laravel)[ Packagist](https://packagist.org/packages/sdtech/file-uploader-laravel)[ RSS](/packages/sdtech-file-uploader-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (10)Used By (0)

file-uploader-laravel | A Library to upload image and file with validation.
===========================================================================

[](#file-uploader-laravel--a-library-to-upload-image-and-file-with-validation)

[![Latest Version](https://camo.githubusercontent.com/dd8e32071133427df0fff75e577c6bae964b2e989486e95db03f1b524cb34041/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f737965646261636368752f66696c652d75706c6f616465722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/syedbacchu/file-uploader-laravel/releases)[![Issues](https://camo.githubusercontent.com/c244a40673d5cbd3000049a78f607fbe3406ee099ea16f71ee659180d6038c26/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f737965646261636368752f66696c652d75706c6f616465722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/syedbacchu/file-uploader-laravel)[![Stars](https://camo.githubusercontent.com/84b5d5d7e5a51c01f2988c47d0eab4ceb45e53e92d42d2a7136843870a241ae9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f737965646261636368752f66696c652d75706c6f616465722d6c61726176656c2e7376673f7374796c653d736f6369616c)](https://github.com/syedbacchu/file-uploader-laravel)[![Stars](https://camo.githubusercontent.com/e34177aefb41fed15607c8da8abd6f2c376639328637d549edbfcbf68721c8a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f737965646261636368752f66696c652d75706c6f616465722d6c61726176656c3f7374796c653d666c61742d737175617265)](https://github.com/syedbacchu/file-uploader-laravel)[![Total Downloads](https://camo.githubusercontent.com/dac57d2e8254489ff6c927e64e9bd53fc1490d3ed75f6ff630dd5bec1a0bb1ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7364746563682f66696c652d75706c6f616465722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sdtech/file-uploader-laravel)

- [About](#about)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Uses](#Uses)

About
-----

[](#about)

A lightweight, framework-friendly Laravel package to validate and upload images/files with zero headaches. Now supports three upload targets out of the box: local storage, public folder, and Amazon S3. Image operations (resize, format conversion, quality) are handled via Intervention/Image.

Current features:

- Upload to local storage (`storage/app/public`)
- Upload to public folder (`public/`)
- Upload to Amazon S3 (via Flysystem S3 adapter)
- Image validation, resizing, and format conversion (webp/png/jpeg/gif/bmp)
- Simple, consistent response structure

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

[](#requirements)

- [Laravel 5.8+](https://laravel.com/docs/installation)
- [PHP ^8.1](https://www.php.net/)

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

[](#installation)

1. From your projects root folder in terminal run:

```
composer require sdtech/file-uploader-laravel
```

2. In config/app.php, add it:

```
'providers' => [
    // Other Service Providers...
    Sdtech\FileUploaderLaravel\Providers\FileUploadLaravelServiceProviders::class,
],
```

3. Publish the packages views, config file, assets, and language files by running the following from your projects root folder:

```
php artisan vendor:publish --tag=fileuploaderlaravel
```

configuration
-------------

[](#configuration)

1. Go to your config folder, then open "fileuploaderlaravel.php" file
2. here you must add that info or add the info to your .env file .

```
'ALLOWED_IMAGE_TYPE' => env('ALLOWED_IMAGE_TYPE'),
'MAX_UPLOAD_IMAGE_SIZE' => env('MAX_UPLOAD_IMAGE_SIZE') // default 2048 KB
'DEFAULT_IMAGE_FORMAT' => env('DEFAULT_IMAGE_FORMAT') // default 'webp',
'DEFAULT_IMAGE_QUALITY' => env('DEFAULT_IMAGE_QUALITY') // default 80,
'AWS_ACCESS_KEY_ID' => env('AWS_ACCESS_KEY_ID'),
'AWS_SECRET_ACCESS_KEY' => env('AWS_SECRET_ACCESS_KEY'),
'AWS_DEFAULT_REGION' => env('AWS_DEFAULT_REGION'),
'AWS_BUCKET' => env('AWS_BUCKET'),
'AWS_URL' => env('AWS_URL')
```

For S3 uploads, ensure your application's `config/filesystems.php` has the `s3` disk configured.

The following dependencies are installed automatically when you install this package:

- league/flysystem-aws-s3-v3
- aws/aws-sdk-php

If anyone faces any issues to install it, you can use:

```
composer require sdtech/file-uploader-laravel --ignore-platform-reqs
```

Example env:

```
FILESYSTEM_DISK=public
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_DEFAULT_REGION=ap-south-1
AWS_BUCKET=your-bucket
AWS_URL=https://your-cdn-or-bucket-url
```

4. run this command

```
php artisan storage:link
```

```
sudo chmod -R 777 storage
```

Uses
----

[](#uses)

5. We provide a sample code of functionality that will help you to integrate easily

```
use Sdtech\FileUploaderLaravel\Service\FileUploadLaravelService;

class UploadController extends Controller
{
    public function uploadImg(Request $request) {

        $service = new FileUploadLaravelService();
        $reqFile = $request->img;
        $path = 'uploads';
        $response = $service->uploadImageInStorage($reqFile,$path);
        return $response;
    }

    public function uploadImgToS3(Request $request) {
        $service = new FileUploadLaravelService();
        $reqFile = $request->img;
        $path = 'uploads';
        // optional: width/height/quality/format
        return $service->uploadImageInS3($reqFile, $path);
    }

    public function uploadFileToS3(Request $request) {
        $service = new FileUploadLaravelService();
        $reqFile = $request->file('file');
        $path = 'files';
        return $service->uploadFileInS3($reqFile, $path);
    }
}
 in the same way you can use other function as well
```

some functions
--------------

[](#some-functions)

### upload image in storage folder

[](#upload-image-in-storage-folder)

```
@param FILE $reqFile (mandetory) uploaded file
@param STRING $path (mandetory) file path where upload iamge
@param STRING $oldFile (optional) old file name  // $oldFile = '1720705563668fe21b791d2.png';
@param ARRAY $allowedImageType  (optional) allowed image type like ["png","webp","jpeg"]
@param INT $maxSize (optional) max upload size in KB 1024KB = 1MB
@param STRING $format (optional) image output format default = webp
@param INT $width (optional) image width
@param INT $height (optional) image height
@param INT $quality (optional) image quality default = 80
```

```
uploadImageInStorage($reqFile,$path,$old_file="",$allowedImageType=[],$maxSize="", $format='',$width="",$height=null,$quality=null)
```

### upload image in main public folder

[](#upload-image-in-main-public-folder)

```
@param FILE $reqFile (mandetory) uploaded file
@param STRING $path (mandetory) file path where upload iamge
@param STRING $oldFile (optional) old file name
@param ARRAY $allowedImageType  (optional) allowed image type like ["png","webp","jpeg"]
@param INT $maxSize (optional) max upload size in KB 1024KB = 1MB
@param STRING $format (optional) image output format default = webp
@param INT $width (optional) image width
@param INT $height (optional) image height
@param INT $quality (optional) image quality default = 80
```

```
uploadImageInPublic($reqFile,$path,$old_file="",$allowedImageType=[],$maxSize="",$format='',$width="",$height=null,$quality=null)
```

### upload image to s3

[](#upload-image-to-s3)

```
@param FILE $reqFile (mandetory) uploaded file
@param STRING $path (mandetory) s3 key prefix (folder) e.g. images/products
@param STRING $oldFile (optional) old file name
@param ARRAY $allowedImageType  (optional) allowed image type like ["png","webp","jpeg"]
@param INT $maxSize (optional) max upload size in KB 1024KB = 1MB
@param STRING $format (optional) image output format default = webp
@param INT $width (optional) image width
@param INT $height (optional) image height
@param INT $quality (optional) image quality default = 80
```

```
uploadImageInS3($reqFile,$path,$old_file="",$allowedImageType=[],$maxSize="",$format='',$width="",$height=null,$quality=null)
```

### upload file in storage folder

[](#upload-file-in-storage-folder)

```
@param FILE $reqFile (mandetory) uploaded file
@param STRING $path (mandetory) file path where upload iamge
@param STRING $oldFile (optional) old file name
@param ARRAY $allowedImageType  (optional) allowed image type like ["png","webp","jpeg"]
@param INT $maxSize (optional) max upload size in KB 1024KB = 1MB
```

```
uploadFileInStorage($reqFile,$path,$old_file="",$allowedImageType=[],$maxSize="")
```

### upload file in public folder

[](#upload-file-in-public-folder)

```
@param FILE $reqFile (mandetory) uploaded file
@param STRING $path (mandetory) file path where upload iamge
@param STRING $oldFile (optional) old file name
@param ARRAY $allowedImageType  (optional) allowed image type like ["png","webp","jpeg"]
@param INT $maxSize (optional) max upload size in KB 1024KB = 1MB
```

```
ploadFileInPublic($reqFile,$path,$old_file="",$allowedImageType=[],$maxSize="")
```

### upload file to s3

[](#upload-file-to-s3)

```
@param FILE $reqFile (mandetory) uploaded file
@param STRING $path (mandetory) s3 key prefix (folder)
@param STRING $oldFile (optional) old file name
@param ARRAY $allowedImageType  (optional) allowed image type like ["png","webp","jpeg"]
@param INT $maxSize (optional) max upload size in KB 1024KB = 1MB
```

```
uploadFileInS3($reqFile,$path,$old_file="",$allowedImageType=[],$maxSize="")
```

### delete file path

[](#delete-file-path)

```
unlinkFile($path,$oldFile)
```

### get file view path for storage folder

[](#get-file-view-path-for-storage-folder)

```
showStorageFileViewPath($path,$fileName)
```

### get file view path for public folder

[](#get-file-view-path-for-public-folder)

```
showFileViewPath($path,$fileName)
```

### get allowed image type

[](#get-allowed-image-type)

```
allowedTypes()
```

### get allowed file type

[](#get-allowed-file-type)

```
allowedFileExtensions()
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance82

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.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 ~73 days

Recently: every ~143 days

Total

9

Last Release

90d ago

PHP version history (2 changes)v1.0.1PHP ^8.1

v1.0.7PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![syedbacchu](https://avatars.githubusercontent.com/u/52558169?v=4)](https://github.com/syedbacchu "syedbacchu (19 commits)")[![webbioxin](https://avatars.githubusercontent.com/u/182597890?v=4)](https://github.com/webbioxin "webbioxin (3 commits)")

---

Tags

laravelthumbnailimagegdimagickresizewatermarkfileupload

### Embed Badge

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

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

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[intervention/image-laravel

Laravel Integration of Intervention Image

1536.5M102](/packages/intervention-image-laravel)[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)[itskodinger/midia

Simple Media manager for your Laravel project

1415.8k](/packages/itskodinger-midia)[intervention/image-symfony

Symfony Integration of Intervention Image

1066.8k](/packages/intervention-image-symfony)

PHPackages © 2026

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