1
0
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:
lapause 2013-03-07 17:27:21 +01:00
parent 11801ca88b
commit 04c29a19db

View File

@ -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]);
}
}