Update AvatarController

This commit is contained in:
Daniel Supernault 2018-11-26 23:53:26 -07:00
parent 2d773ca537
commit 3cbe367869
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -58,7 +58,7 @@ class AvatarController extends Controller
$path = $this->buildPath($id);
$dir = storage_path('app/'.$path);
$this->checkDir($dir);
$name = 'avatar.'.$file->guessExtension();
$name = str_random(20).'_avatar.'.$file->guessExtension();
$res = ['root' => 'storage/app/'.$path, 'name' => $name, 'storage' => $path];
return $res;