Forgot to test changes in your codebase lol
This commit is contained in:
andynazay153 2018-06-12 19:52:19 -07:00 committed by GitHub
commit 36b4d3005f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -288,17 +288,22 @@ class SpacesConnect {
*/
function DownloadFile($fileName, $destinationPath = false) {
try {
$result = $this->client->getObject(array(
'Bucket' => $this->space,
'Key' => $fileName,
'SaveAs' => $destinationPath
));
if(!$destinationPath) {
return $result;
}
return $this->ObjReturn($result->toArray());
$result = $this->client->getObject(array(
'Bucket' => $this->space,
'Key' => $fileName,
));
return $result['Body'];
}else{
$result = $this->client->getObject(array(
'Bucket' => $this->space,
'Key' => $fileName,
'SaveAs' => $destinationPath
));
return $this->ObjReturn($result->toArray());
}
}
catch (\Exception $e) {
$this->HandleAWSException($e);