mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Fix avatar bug
This commit is contained in:
parent
82f3c50766
commit
8498779430
4 changed files with 11 additions and 0 deletions
|
@ -48,6 +48,12 @@ class CreateAvatar implements ShouldQueue
|
||||||
$icon = $identicon->getIcon($hash);
|
$icon = $identicon->getIcon($hash);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
$baseDir = storage_path('app/public/avatars');
|
||||||
|
if(!is_dir($baseDir)) {
|
||||||
|
mkdir($baseDir);
|
||||||
|
}
|
||||||
|
|
||||||
$prefix = $profile->id;
|
$prefix = $profile->id;
|
||||||
$padded = str_pad($prefix, 12, 0, STR_PAD_LEFT);
|
$padded = str_pad($prefix, 12, 0, STR_PAD_LEFT);
|
||||||
$parts = str_split($padded, 3);
|
$parts = str_split($padded, 3);
|
||||||
|
|
3
storage/app/public/avatars/.gitignore
vendored
Normal file
3
storage/app/public/avatars/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!default.png
|
BIN
storage/app/public/avatars/default.png
Normal file
BIN
storage/app/public/avatars/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 KiB |
2
storage/debugbar/.gitignore
vendored
Normal file
2
storage/debugbar/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
Loading…
Reference in a new issue