y
Size: a a a
y
АБ
АБ
y
y
d.
y
АБ
АБ
АБ
upload_max_filesize=40M
post_max_size=40M
y
y
d.
d.
d.
АБ
public static function UploadImage($originalName, $destinationPath)but it didn't help me
{
try {
$host = env('IMAGE_API_HOST');
$endpoint = $host . "/image/upload";
$client = new Client();
$response = $client->request('POST', $endpoint, [
'multipart' => [
[
'name' => 'image[]',
'filename' => $originalName,
'contents' => fopen(public_path($destinationPath . $originalName), 'r'),
]
]
]);
$result = json_decode($response->getBody(), true);
dd($result);
} catch (\Exception $exception) {
Log::error($exception->getMessage());
$result = [];
} catch (GuzzleException $e) {
Log::error($e->getMessage());
$result = [];
}
return $result;
}
d.
d.
АБ
d.