mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 07:33:43 +08:00
* Fix avatar upload on Windows servers - Issue #893 * Remove @ to show errors if any
This commit is contained in:
parent
58a3d33b60
commit
1904e36419
@ -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…
x
Reference in New Issue
Block a user