Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Delete an uploaded Image/(File) #447

@omarmounir908

Description

@omarmounir908

Good Day,

I'm trying to remove the uploaded image/file from the folder to keep the storage clean using unlink() method

so when hitting the checkbox of delete item the below event fired

$grid->row(function ($row) {
           if (empty($row->cell('image_path')->value)) {
                unlink('uploads/images/main-slider/'.$row->cell('image_path')->value);
           }

        });

Error message:
unlink(uploads/images/main-slider/): Permission denied

your Prompt help is much appreciated

Other Question is it possible link the delete icon in the grid view with the unlink() method ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions