mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-25 18:43:22 +01:00
Updated RequestFactory::create() to take into account keys of file parameters
This commit is contained in:
parent
11801ca88b
commit
04c29a19db
@ -112,7 +112,7 @@ class RequestFactory implements RequestFactoryInterface
|
||||
// Normalize PHP style cURL uploads with a leading '@' symbol
|
||||
foreach ($body as $key => $value) {
|
||||
if (is_string($value) && substr($value, 0, 1) == '@') {
|
||||
$request->addPostFile('file', $value);
|
||||
$request->addPostFile($key, $value);
|
||||
unset($body[$key]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user