Skip to content

Commit

Permalink
Merge pull request #76 from SteppingHat/master
Browse files Browse the repository at this point in the history
Always fill the File object with all available response data
  • Loading branch information
mlambley authored Oct 10, 2022
2 parents f00d51d + 7e803d5 commit 3abcf1a
Show file tree
Hide file tree
Showing 4 changed files with 9,024 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ public function upload(array $options)
$response['contentSha1'],
$response['contentLength'],
$response['contentType'],
$response['fileInfo']
$response['fileInfo'],
$response['bucketId'],
$response['action'],
$response['uploadTimestamp']
);
}

Expand Down Expand Up @@ -380,7 +383,7 @@ public function listFiles(array $options)
foreach ($response['files'] as $file) {
// if we have a file name set, only retrieve information if the file name matches
if (!$fileName || ($fileName === $file['fileName'])) {
$files[] = new File($file['fileId'], $file['fileName'], null, $file['size']);
$files[] = new File($file['fileId'], $file['fileName'], $file['contentSha1'], $file['size'], $file['contentType'], $file['fileInfo'], $file['bucketId'], $file['action'], $file['uploadTimestamp']);
}
}

Expand Down
Loading

0 comments on commit 3abcf1a

Please sign in to comment.