Skip to content

Commit

Permalink
Update Media model, fix remote media preview
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Mar 5, 2020
1 parent eeca1fb commit 9947050
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public function url()

public function thumbnailUrl()
{
$path = $this->thumbnail_path ?? 'public/no-preview.png';
return url(Storage::url($path));
if($this->remote_media == true) {
return $this->remote_url;
} else {
$path = $this->thumbnail_path ?? 'public/no-preview.png';
return url(Storage::url($path));
}
}

public function thumb()
Expand Down

0 comments on commit 9947050

Please sign in to comment.