mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 13:03:16 +00:00
commit
d6f46f4775
3 changed files with 7 additions and 5 deletions
|
@ -24,6 +24,7 @@
|
||||||
- Update ProfileController, cache actor object and atom feed ([8665eab1](https://github.com/pixelfed/pixelfed/commit/8665eab1))
|
- Update ProfileController, cache actor object and atom feed ([8665eab1](https://github.com/pixelfed/pixelfed/commit/8665eab1))
|
||||||
- Update NotificationTransformer, fix mediaTag and modLog types ([b6c06c4b](https://github.com/pixelfed/pixelfed/commit/b6c06c4b))
|
- Update NotificationTransformer, fix mediaTag and modLog types ([b6c06c4b](https://github.com/pixelfed/pixelfed/commit/b6c06c4b))
|
||||||
- Update landing view, add `app.name` and `app.short_description` for better customizability ([bda9d16b](https://github.com/pixelfed/pixelfed/commit/bda9d16b))
|
- Update landing view, add `app.name` and `app.short_description` for better customizability ([bda9d16b](https://github.com/pixelfed/pixelfed/commit/bda9d16b))
|
||||||
|
- Update Profile, fix avatarUrl paths. Fixes #3559 #3634 ([989e4249](https://github.com/pixelfed/pixelfed/commit/989e4249))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
||||||
|
|
|
@ -164,15 +164,16 @@ class Profile extends Model
|
||||||
if(substr($avatar->cdn_url, 0, 8) === 'https://') {
|
if(substr($avatar->cdn_url, 0, 8) === 'https://') {
|
||||||
return $avatar->cdn_url;
|
return $avatar->cdn_url;
|
||||||
} else {
|
} else {
|
||||||
return url($avatar->cdn_url);
|
return url('/storage/avatars/default.jpg');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($avatar->is_remote) {
|
$path = $avatar->media_path;
|
||||||
|
|
||||||
|
if(substr($path, 0, 6) !== 'public') {
|
||||||
return url('/storage/avatars/default.jpg');
|
return url('/storage/avatars/default.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = $avatar->media_path;
|
|
||||||
$path = "{$path}?v={$avatar->change_count}";
|
$path = "{$path}?v={$avatar->change_count}";
|
||||||
|
|
||||||
return config('app.url') . Storage::url($path);
|
return config('app.url') . Storage::url($path);
|
||||||
|
|
|
@ -246,7 +246,7 @@ class MediaStorageService {
|
||||||
$file = $disk->putFileAs($base, new File($tmpName), $path, 'public');
|
$file = $disk->putFileAs($base, new File($tmpName), $path, 'public');
|
||||||
$permalink = $disk->url($file);
|
$permalink = $disk->url($file);
|
||||||
|
|
||||||
$avatar->media_path = $base . $path;
|
$avatar->media_path = $base . '/' . $path;
|
||||||
$avatar->is_remote = true;
|
$avatar->is_remote = true;
|
||||||
$avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink;
|
$avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink;
|
||||||
$avatar->size = $head['length'];
|
$avatar->size = $head['length'];
|
||||||
|
|
Loading…
Reference in a new issue