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

Delete image from s3 #127

Open
nimisham opened this issue Jul 5, 2021 · 9 comments
Open

Delete image from s3 #127

nimisham opened this issue Jul 5, 2021 · 9 comments

Comments

@nimisham
Copy link

nimisham commented Jul 5, 2021

I am using s3 to upload images and preview it using temporary urls.
But when we try to delete images facing issue like attached

image

In short we don't have coumn in our resource.. we are managing it using spatie media library (media table)

@dmitrybubyakin
Copy link
Owner

@nimisham Hi! Could you please provide logs?

@nimisham
Copy link
Author

nimisham commented Jul 5, 2021 via email

@dmitrybubyakin
Copy link
Owner

@nimisham Do you use any plugins? Or maybe this field is conditional?

@dmitrybubyakin
Copy link
Owner

The error says there is no media field within fields of your resource.

@nimisham
Copy link
Author

nimisham commented Jul 5, 2021

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)); })
image

@dmitrybubyakin
Copy link
Owner

@nimisham Looks like this package doesn't support Nova Tabs.

@dmitrybubyakin
Copy link
Owner

@nimisham You can add custom resolver in your service provider like this

MedialibraryFieldResolver::$resolvers = array_merge(MedialibraryFieldResolver::$resolvers, [

@nimisham
Copy link
Author

nimisham commented Jul 5, 2021

@nimisham Looks like this package doesn't support Nova Tabs.

yes it's because of Nova tab

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

No branches or pull requests

2 participants