mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 00:05:29 +00:00
Update Status model, add cache busting to unprocessed media urls
This commit is contained in:
parent
85d164ce07
commit
8194432073
1 changed files with 4 additions and 2 deletions
|
@ -42,8 +42,10 @@ class Status extends Model
|
|||
|
||||
public function mediaUrl()
|
||||
{
|
||||
$path = $this->firstMedia()->media_path;
|
||||
$url = Storage::url($path);
|
||||
$media = $this->firstMedia();
|
||||
$path = $media->media_path;
|
||||
$hash = is_null($media->processed_at) ? md5('unprocessed') : md5($media->created_at);
|
||||
$url = Storage::url($path) . "?v={$hash}";
|
||||
return url($url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue