mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update Status Model
This commit is contained in:
parent
33b4d354e7
commit
7fcb1186d9
1 changed files with 5 additions and 1 deletions
|
@ -118,7 +118,11 @@ class Status extends Model
|
||||||
$media = $this->firstMedia();
|
$media = $this->firstMedia();
|
||||||
$path = $media->media_path;
|
$path = $media->media_path;
|
||||||
$hash = is_null($media->processed_at) ? md5('unprocessed') : md5($media->created_at);
|
$hash = is_null($media->processed_at) ? md5('unprocessed') : md5($media->created_at);
|
||||||
$url = Storage::url($path)."?v={$hash}";
|
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);
|
return url($url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue