mirror of
https://github.com/the-programmers-hangout/Hermes.git
synced 2026-09-09 23:45:36 +02:00
use detatch rather than getContents for image data
This commit is contained in:
@@ -35,8 +35,8 @@ class UpdateEmoteImages extends Service
|
|||||||
$client = new \GuzzleHttp\Client;
|
$client = new \GuzzleHttp\Client;
|
||||||
$response = $client->get($url);
|
$response = $client->get($url);
|
||||||
if ($response->getStatusCode() === 200) {
|
if ($response->getStatusCode() === 200) {
|
||||||
$imageData = $response->getBody()->getContents();
|
$stream = $response->getBody()->detach();
|
||||||
$emote->image = $imageData;
|
$emote->image = $stream;
|
||||||
$emote->save();
|
$emote->save();
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user