Skip to content

Commit

Permalink
Added a return value on putObject as the total bytes written
Browse files Browse the repository at this point in the history
  • Loading branch information
madrobot committed Mar 29, 2016
1 parent 59caba9 commit 559cafd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(Configuration $configuration)
* @param string $acl ACL constant, by default the object is private (visible only to the uploading user)
* @param array $requestHeaders Array of request headers
*
* @return void
* @return int
*
* @throws CannotPutFile If the upload is not possible
*/
Expand Down Expand Up @@ -142,6 +142,8 @@ public function putObject(Input $input, $bucket, $uri, $acl = Acl::ACL_PRIVATE,
sprintf(__METHOD__ . "(): [%s] %s\n\nDebug info:\n%s", $response->error->getCode(), $response->error->getMessage(), print_r($response->body, true))
);
}

return $response->getHeaders()['Content-Length'];
}

/**
Expand Down

0 comments on commit 559cafd

Please sign in to comment.