zhanang19 / medialibrary-gitlab-storage
Spatie Medialibrary Gitlab Storage with custom URL generator
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/zhanang19/medialibrary-gitlab-storage
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- illuminate/support: ^7.0
- spatie/laravel-medialibrary: ^7.0.0
- zhanang19/laravel-gitlab-storage: ^1.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-09-08 14:38:11 UTC
README
This package provide an URL Generator for assets that stored in Gitlab Storage.
Installation
Run command composer require zhanang19/medialibrary-gitlab-storage
This package is tested only in Laravel 7
Configuration
- This package require
spatie/medialibrary:^7.0by default. So, you can removespatie/medialibraryfrom yourcomposer.json. Configure it to use gitlab as media disk in your.envfile
MEDIA_DISK="gitlab"
- This package require
zhanang19/laravel-gitlab-storageby default. Just initiate config for that
# config/filesystems.php 'disks' => [ 'gitlab' => [ 'driver' => 'gitlab', 'project_id' => env('GITLAB_PROJECT_ID'), 'access_token' => env('GITLAB_ACCESS_TOKEN', ''), 'branch' => env('GITLAB_BRANCH', 'master'), 'base_url' => env('GITLAB_BASE_URL', 'https://gitlab.com'), 'debug' => (bool)env('GITLAB_DEBUG', env('APP_DEBUG', false)) ] ],
- Configure custom url generator in
medialibrary.phpconfig
# config/medialibrary.php 'url_generator' => \Zhanang19\MediaLibraryGitlab\GitlabUrlGenerator::class,
Caveat
Conversion and responsive images doesn't working correctly. This cause by Gitlab API doesn't support streaming file to copy and process the image.