Fix avatar upload on Windows servers - Issue #893 (#927)

* Fix avatar upload on Windows servers - Issue #893

* Remove @ to show errors if any
This commit is contained in:
Lyntor Paul Figueroa 2016-05-12 22:01:51 +08:00 committed by Franz Liedke
parent 3c6429aba8
commit 006ea02227

View File

@ -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)