Skip to content

Commit da6f106

Browse files
Stephan Wentztemp
authored andcommitted
fix: Allow override of multipart file mimetype
1 parent 98f09d8 commit da6f106

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/HttpClientMock/MockRequestBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ public function multipart(
301301
return $this;
302302
}
303303

304-
public function multipartFromFile(string $name, File $file): self
304+
public function multipartFromFile(string $name, File $file, string|null $mimetype = null): self
305305
{
306306
$this->multipart(
307307
$name,
308-
mimetype: $file->getMimeType(),
308+
mimetype: $mimetype ?? $file->getMimeType(),
309309
filename: $file->getBasename(),
310310
content: $file->getContent(),
311311
);

0 commit comments

Comments
 (0)