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.
- PHP 8.3 or higher
- CodeIgniter 4.6 or higher
- CodeIgniter Queue
// 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);
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.
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
All notable changes to this project are documented in the CHANGELOG.md file.
Contributions are welcome! Please see CONTRIBUTING.md for details on how to contribute to this project.
If you discover a security vulnerability, please send an email to [email protected] instead of using the issue tracker. All security vulnerabilities will be promptly addressed.
The MIT License (MIT). Please see License File for more information.