mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-13 03:36:21 +00:00
sync script added and fixed some controllers
This commit is contained in:
@@ -36,7 +36,23 @@ class S3Storage implements StorageController
|
||||
if(!$this->s3)$this->connect();
|
||||
|
||||
return $this->s3->doesObjectExist(S3_BUCKET,$hash);
|
||||
}
|
||||
}
|
||||
|
||||
function getItems()
|
||||
{
|
||||
if(!$this->s3)$this->connect();
|
||||
|
||||
$iterator = $this->s3->getIterator('ListObjects', [
|
||||
'Bucket' => S3_BUCKET
|
||||
]);
|
||||
|
||||
$items = array();
|
||||
foreach ($iterator as $object) {
|
||||
$items[] = $object['Key'];
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
function pullFile($hash,$location)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user