laravel-upload maintained by ervinsvilumsons
Description
Laravel Upload Manager is a package that provides an easy way to handle file uploads in Laravel applications.
Author
Last update
2026/09/05 19:25
(dev-main)
License
Downloads
4
Tags
Laravel Upload Manager
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 and other content hashing
- Optional streaming encryption
- Content-based filenames and deduplication
- Configurable upload profiles
- Dynamic paths such as
uploads/{year}/{month}/{day} - Extensible architecture
📦 Installation
composer require ervinsvilumsons/laravel-upload
Publish the configuration:
php artisan vendor:publish --provider="ErvinsVilumsons\LaravelUpload\UploadManagerServiceProvider"
🚀 Quick Start
use UploadManager;
$result = UploadManager::profile('default')->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;