maniaba / asset-connect
AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application
Requires
- php: ^8.3
- codeigniter4/framework: ^4.6
- codeigniter4/queue: dev-develop
Requires (Dev)
- codeigniter/coding-standard: ^1.5
- dg/bypass-finals: ^1.9
- fakerphp/faker: ^1.9
- icanhazstring/composer-unused: dev-main
- mikey179/vfsstream: ^1.6
- nexusphp/cs-config: ^3.6
- nexusphp/tachycardia: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^2.0
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^10.5 || ^11.5 || ^12.0
- rector/rector: ^2.0
- roave/security-advisories: dev-latest
- vimeo/psalm: ^5.0 || ^6.0
This package is auto-updated.
Last update: 2025-07-06 11:52:10 UTC
README
AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application. It provides a robust, flexible solution for handling file uploads, storage, and retrieval with powerful features like collections, custom properties, and secure access control.
Requirements
- PHP 8.3 or higher
- CodeIgniter 4.6 or higher
- CodeIgniter Queue
Example Usage
// Add an asset to a user $asset = $user->addAsset('/path/to/file.jpg') ->withCustomProperties([ 'title' => 'Profile Picture', 'description' => 'User profile picture' ]) ->toAssetCollection(); // Get all assets for a user $assets = $user->getAssets(); // Get the URL to an asset $url = $user->getFirstAsset()->getUrl(); // Delete assets from a specific collection $user->deleteAssets(ImagesCollection::class);
Documentation
Comprehensive documentation is available at https://maniaba.github.io/asset-connect/.
Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the media library? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.
Testing
Run the test suite with:
composer test
For more detailed testing options:
# Run with code coverage composer test -- --coverage-html=build/coverage # Run static analysis composer analyze
Changelog
All notable changes to this project are documented in the CHANGELOG.md file.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details on how to contribute to this project.
Security
If you discover a security vulnerability, please send an email to maniaba@outlook.com instead of using the issue tracker. All security vulnerabilities will be promptly addressed.
License
The MIT License (MIT). Please see License File for more information.