Search by

ervinsvilumsons / laravel-upload

Laravel Upload Manager is a package that provides an easy way to handle file uploads in Laravel applications.

Maintainers

Package info

github.com/ervinsvilumsons/laravel-upload

pkg:composer/ervinsvilumsons/laravel-upload

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v1.0.1 2026-09-05 17:07 UTC

This package is auto-updated.

Last update: 2026-09-07 16:29:55 UTC


README

Latest Version on Packagist PHP 8.3+ Laravel 10+ Tests codecov License

A stream-aware file upload package for Laravel with hashing, encryption, deduplication, and configurable upload profiles.

🧩 Features

  • Stream large files without loading them entirely into memory
  • SHA-256 content hashing
  • Optional streaming encryption
  • Content-based filenames and deduplication
  • Configurable upload profiles
  • Dynamic paths such as uploads/{year}/{month}/{day}

📦 Installation

composer require ervinsvilumsons/laravel-upload

Publish the configuration:

php artisan vendor:publish --tag=upload-manager-config

🚀 Quick Start

use UploadManager;

$result = UploadManager::profile('documents')->upload($request->file('document'));

Profiles

Configure different upload strategies in config/upload-manager.php:

return [
    'default' => [
        'disk' => 'local',
        'path' => 'uploads/{year}/{month}/{day}',
        'filename' => 'uuid',
        'hash' => false,
        'encrypt' => false,
    ],

    'profiles' => [
        'documents' => [
            'path' => 'documents',
            'filename' => 'sha256',
            'hash' => true,
        ],

        'secure' => [
            'disk' => 's3',
            'path' => 'secure',
            'filename' => 'sha256',
            'encrypt' => true,
        ],
    ],
];

Upload Result

$result->path;
$result->url;
$result->size;
$result->contentHash;
$result->name;
$result->originalName;
$result->extension;
$result->mimeType;

⚖️ License

Laravel Upload Manager is released under the MIT License.