1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 00:05:29 +00:00

Update Status Model

This commit is contained in:
Daniel Supernault 2019-01-12 01:07:39 -07:00
parent 33b4d354e7
commit 7fcb1186d9
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -118,7 +118,11 @@ class Status extends Model
$media = $this->firstMedia();
$path = $media->media_path;
$hash = is_null($media->processed_at) ? md5('unprocessed') : md5($media->created_at);
if(config('pixelfed.cloud_storage') == true) {
$url = Storage::disk(config('filesystems.cloud'))->url($path)."?v={$hash}";
} else {
$url = Storage::url($path)."?v={$hash}";
}
return url($url);
}