mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Update README.md
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user