Skip to content

Media on S3 compatible does not get deleted #3685

@nezaboravi

Description

@nezaboravi

Hello,
Looks like I have all set properly, and files are getting uploaded on DO Spaces.

With previous ( I think previous media library) library removing and uploading works.

Now, is little bit changed in version 11, so we are using as per documentation, $media->delete();

However, file is not really deleted from DO spaces. It si removed from Media model tho.
Note that uploading does work.

Here is the piece of code:

try {
            $media->delete();

        } catch (\Exception $e) {
            Log::info($e->getMessage());
            return response()->json(['message' => 'Failed to delete media'], 500);
        }

No error is catch, but media is still on DO, not removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions