mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
* Fix avatar upload on Windows servers - Issue #893 * Remove @ to show errors if any
This commit is contained in:
parent
3c6429aba8
commit
006ea02227
|
@ -96,7 +96,10 @@ class UploadAvatarHandler
|
|||
$this->validator->assertValid(['avatar' => $file]);
|
||||
|
||||
$manager = new ImageManager;
|
||||
$manager->make($tmpFile)->fit(100, 100)->save();
|
||||
|
||||
$encodedImage = $manager->make($tmpFile)->fit(100, 100)->encode('jpg', 100);
|
||||
|
||||
file_put_contents($tmpFile, $encodedImage);
|
||||
|
||||
$this->events->fire(
|
||||
new AvatarWillBeSaved($user, $actor, $tmpFile)
|
||||
|
|
Loading…
Reference in New Issue
Block a user