ArtisanPack UI
DocsSecure UploadsInstallation

Installation

Secure Uploads v1.0.1

The package auto-registers via Laravel's package discovery. Creates the table used by the model. Publishes . Override allow/blocklists, size limits...

Install via Composer

composer require artisanpack-ui/secure-uploads

The package auto-registers via Laravel's package discovery.

Run the migration

php artisan migrate

Creates the secure_files table used by the SecureUploadedFile model.

(Optional) Publish the config

php artisan vendor:publish --tag=secure-uploads-config

Publishes config/artisanpack/secure-uploads.php. Override allow/blocklists, size limits, scanner driver selection, rate limiting, and quarantine settings here.

Add the routes

The package's SecureFileController routes are loaded automatically by the service provider:

GET  /secure-file/{identifier}
GET  /secure-file/{identifier}/download

Both routes are wrapped in Laravel's signed middleware — you generate URLs via URL::signedRoute() or secure_uploads()->generateSecureUrl().

Add the trait to consumer models

Any model that owns uploaded files should use the HasSecureFiles trait:

use ArtisanPackUI\SecureUploads\Concerns\HasSecureFiles;

class Post extends Model
{
    use HasSecureFiles;
}

Deeper topics

  • Requirements — PHP / Laravel versions, optional system deps (ClamAV, VirusTotal API access)
  • Configuration — full config reference
  • Scanner setup — wiring ClamAV (socket or binary) and VirusTotal

Stay in the Loop

Monthly tips, tutorials and package updates — plus a free Quick Start cheat sheet.

Subscribe
Edit this page on GitHub