mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +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]);
|
$this->validator->assertValid(['avatar' => $file]);
|
||||||
|
|
||||||
$manager = new ImageManager;
|
$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(
|
$this->events->fire(
|
||||||
new AvatarWillBeSaved($user, $actor, $tmpFile)
|
new AvatarWillBeSaved($user, $actor, $tmpFile)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user