Skip to content

Commit

Permalink
chore(docs): add how use custom disk
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneBour committed Feb 23, 2024
1 parent 68398b1 commit 1b05062
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/core/reference/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,19 @@ class YourCustomModel extends Model
```

Now your models will auto generate transforms as defined in your configuration and still use medialibrary under the hood.

## Use custom disk

By default, media is stored on the `public` disk. If you want to use a different disk, you need to set the environment variable `MEDIA_DISK` to the name of the disk you want to use.

```shell
MEDIA_DISK=ovh
```
If you need more customisation, you can install `spatie/laravel-medialibrary` and publish the configuration file.

```shell
composer require spatie/laravel-medialibrary
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="config"
```

Then you can change the disk in the configuration file `config/media-library.php`.

0 comments on commit 1b05062

Please sign in to comment.