nova-medialibrary-field
nova-medialibrary-field copied to clipboard
Delete image from s3
I am using s3 to upload images and preview it using temporary urls. But when we try to delete images facing issue like attached

In short we don't have coumn in our resource.. we are managing it using spatie media library (media table)
@nimisham Hi! Could you please provide logs?
hi
please find below Screenshot for error

exception: "Exception"
file: "\vendor\dmitrybubyakin\nova-medialibrary-field\src\MedialibraryFieldResolver.php"
line: 45
message: "Field with attribute media is not found."
@nimisham Do you use any plugins? Or maybe this field is conditional?
The error says there is no media field within fields of your resource.
This is line of code that Iam using inside nova tab.. no we are not usinf any condition here
Medialibrary::make('Images','image_gallery','s3') ->maxSizeInBytes(1024*1024*50)//in bytes ->sortable() ->previewUsing(function (Media $media) { return $media->getTemporaryUrl(now()->addMinutes(5)); })

@nimisham Looks like this package doesn't support Nova Tabs.
@nimisham This might be helpful https://github.com/dmitrybubyakin/nova-medialibrary-field/blob/master/src/Integrations/NovaDependencyContainer/ResolveFromDependencyContainerFields.php
@nimisham You can add custom resolver in your service provider like this https://github.com/dmitrybubyakin/nova-medialibrary-field/blob/de739adcc2430dec02a814d4d7c3236dfe490910/tests/Unit/MedialibraryRequestTest.php#L19
@nimisham Looks like this package doesn't support Nova Tabs.
yes it's because of Nova tab