Skip to content

Commit

Permalink
update filename
Browse files Browse the repository at this point in the history
  • Loading branch information
AlboCode committed Nov 23, 2023
1 parent 0504da5 commit 1d166d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/CCatClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ public function sendMessage(Message $message, ?\Closure $closure = null): Respon
* @param int|null $chunkOverlap
* @return PromiseInterface
*/
public function rabbitHole(string $filePath, ?int $chunkSize, ?int $chunkOverlap): PromiseInterface
public function rabbitHole(string $filePath, ?string $fileName, ?int $chunkSize, ?int $chunkOverlap): PromiseInterface
{
$promise = $this->httpClient->getHttpClient()->postAsync('rabbithole/', [
'multipart' => [
[
'name' => 'file',
'contents' => Utils::tryFopen($filePath, 'r')
'contents' => Utils::tryFopen($filePath, 'r'),
'filename' => $fileName ?? null
],
]
]);
Expand Down

0 comments on commit 1d166d9

Please sign in to comment.