Skip to content

Add support for setting storage disk #430

Open
damarinov1 wants to merge 2 commits intoebess:masterfrom
damarinov1:master
Open

Add support for setting storage disk #430
damarinov1 wants to merge 2 commits intoebess:masterfrom
damarinov1:master

Conversation

@damarinov1
Copy link

Added a feature where you can specify the storage disk where you want the file to be saved.

Example:

use Ebess\AdvancedNovaMediaLibrary\Fields\Images;

public function fields(Request $request)
{
    return [
        Images::make('Main image', 'main')
            ->disk($diskName);
    ];
}

@damarinov1 damarinov1 changed the title feature: possibility to set storage disk Add support for setting storage disk Feb 1, 2024
@ju-gow
Copy link

ju-gow commented May 12, 2024

Hello,

I think this should be configured in media-library rather than here :
https://spatie.be/docs/laravel-medialibrary/v11/working-with-media-collections/defining-media-collections#content-using-a-specific-disk

@damarinov1
Copy link
Author

damarinov1 commented May 14, 2024

Configuring it in the media-library would make it global and will save all files in the configured disk.

Here the idea is that you can have different Nova fields across your application that each field is saving the file in different disks. For example, image would be saved in media disk, project files would be saved in projects disk and etc.

@damarinov1
Copy link
Author

@ebess Any chance this to be reviewed any time soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants