diff --git a/app/Services/ApiClient.php b/app/Services/ApiClient.php index 5e94a44..3bee70c 100644 --- a/app/Services/ApiClient.php +++ b/app/Services/ApiClient.php @@ -171,10 +171,11 @@ class ApiClient public function upload(string $endpoint, array $files = [], array $data = []) { + $this->setTimeout(300); + $this->setConnectTimeout(10); return $this->requestWithCatch(function () use ($endpoint, $files, $data) { - $request = $this->timeout(300) - ->connectTimeout(300) - ->withDefaultHeaders(); + $request = $this->withDefaultHeaders(); + foreach ($files as $key => $filePath) { $filename = basename($filePath); $request = $request->attach($key, fopen($filePath, 'r'), $filename);