Laravel Uploads for simple, secure file storage
ghostcompiler/laravel-uploads is a Laravel package for laravel uploads for simple, secure file storage.
It currently has 18 GitHub stars and 2.371 downloads on Packagist (latest version v1.2.0).
Install it with composer require ghostcompiler/laravel-uploads.
Discover more Laravel packages by ghostcompiler
or browse all Laravel packages to compare alternatives.
Last updated
Laravel Uploads manages local/cloud file storage, tracks upload metadata, generates secure tokenized preview URLs, integrates with Eloquent models, and supports real-time image optimization. It also features on-demand proxy streaming for remote URLs with zero local disk footprint.
Install the package via Composer:
composer require ghostcompiler/laravel-uploads
php artisan install:laravel-uploads
php artisan migrate
Use --force to overwrite any existing assets:
php artisan install:laravel-uploads --force
use GhostCompiler\LaravelUploads\Facades\Uploads;
// Store a file under configured defaults
$upload = Uploads::upload($request->file('avatar'));
// Store to a specific directory inside the storage path
$upload = Uploads::upload('avatars', $request->file('avatar'));
You can pass a remote URL string directly. The package will register the reference in the database, proxying it on-demand to hide the source URL and bypass local disk storage:
$upload = Uploads::upload('https://avatar.example.com/user123.jpg');
Retrieve secure tokenized URLs to stream or preview private files:
// Generates a secure routing URL expiring in 15 minutes
$url = Uploads::url($upload, 15);
For detailed guides on configuration settings, Eloquent trait integrations, custom URL resolvers, image optimization pipelines, and Artisan commands, see the: