Download the PHP package bekwoh/laravel-media-secure without Composer
On this page you can find all versions of the php package bekwoh/laravel-media-secure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bekwoh/laravel-media-secure
More information about bekwoh/laravel-media-secure
Files in bekwoh/laravel-media-secure
Package laravel-media-secure
Short Description Securely display Media
License MIT
Homepage https://github.com/cleaniquecoders/laravel-media-secure
Informations about the package laravel-media-secure
Laravel Media Secure
Secure your media file access with authentication and policy-based authorization. Built on top of Spatie Laravel MediaLibrary, this package provides secure view, download, and stream endpoints with fine-grained access control.
Features
- Secure media URLs with UUID-based routing
- Three access types: view, download, and stream
- Signed URLs for time-limited access without authentication
- Authentication requirement (configurable)
- Policy-based authorization with parent model delegation
- Customizable middleware stack
- ETag/Last-Modified caching headers for performance
- Memory-efficient file streaming for large files
- Helper functions for URL generation
Installation
Publish the config file:
Quick Start
1. Generate Secure URLs (Authenticated)
2. Generate Signed URLs (Shareable)
Signed URLs allow sharing media with external users without requiring authentication. URLs are cryptographically signed and expire after a configurable time.
3. Create a Policy for Your Model (Required when strict = true)
4. Register the Policy
Signed URLs
Signed URLs are perfect for:
- Sharing files via email or messaging
- Embedding media in external applications
- Providing temporary access to clients
- API integrations where authentication is impractical
Configuration
Environment Variables
Documentation
For detailed documentation, see docs/README.md.
- Getting Started
- Configuration
- Authorization
- Signed URLs
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Nasrul Hazim Bin Mohamad
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-media-secure with dependencies
cleaniquecoders/traitify Version ^1.1
illuminate/contracts Version ^11.0 | ^12.0 | ^13.0
spatie/laravel-medialibrary Version ^10.5 | ^11.5
spatie/laravel-package-tools Version ^1.14.0