Skip to content

Commit

Permalink
Fixed delete of file that was treated like folder
Browse files Browse the repository at this point in the history
isImage() get a delete url for file's and image, and only isFolder() have different url so change condition for return a delete_url for file's and image's and only instead isFolder() the delete url for folder
  • Loading branch information
arturmamedov authored Dec 17, 2020
1 parent cc711e2 commit 48f8a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/Media/Transformers/MediaTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private function getPath()

private function getDeleteUrl()
{
if ($this->resource->isImage()) {
if (!$this->resource->isFolder()) {
return route('api.media.media.destroy', $this->resource->id);
}

Expand Down

0 comments on commit 48f8a28

Please sign in to comment.