Permalink
Browse files

Updated RequestFactory::create() to take into account keys of file pa…

…rameters
  • Loading branch information...
1 parent 1312dfb commit 923c8eba5d0ca246d0b569b2382e7db6141b76c8 @lapause lapause committed Mar 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Message/RequestFactory.php
@@ -112,7 +112,7 @@ public function create($method, $url, $headers = null, $body = null)
// 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]);
}
}

0 comments on commit 923c8eb

Please sign in to comment.