Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting storage disk #430

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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