Update README.md

This commit is contained in:
Dan Harrin
2023-10-16 11:33:00 +01:00
committed by GitHub
parent 4c9183651f
commit bc6df1466b
@@ -80,18 +80,6 @@ SpatieMediaLibraryFileUpload::make('attachments')
You may now drag and drop files into order.
### Adding custom headers
You may pass in custom headers when uploading files using the `customHeaders()` method:
```php
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
SpatieMediaLibraryFileUpload::make('attachments')
->multiple()
->customHeaders(['CacheControl' => 'max-age=86400'])
```
### Adding custom properties
You may pass in [custom properties](https://spatie.be/docs/laravel-medialibrary/advanced-usage/using-custom-properties) when uploading files using the `customProperties()` method:
@@ -104,6 +92,18 @@ SpatieMediaLibraryFileUpload::make('attachments')
->customProperties(['zip_filename_prefix' => 'folder/subfolder/'])
```
### Adding custom headers
You may pass in custom headers when uploading files using the `customHeaders()` method:
```php
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
SpatieMediaLibraryFileUpload::make('attachments')
->multiple()
->customHeaders(['CacheControl' => 'max-age=86400'])
```
### Generating responsive images
You may [generate responsive images](https://spatie.be/docs/laravel-medialibrary/responsive-images/getting-started-with-responsive-images) when the files are uploaded using the `responsiveImages()` method: