sync script added and fixed some controllers

This commit is contained in:
Chris
2020-01-07 22:13:29 +01:00
parent 63fe1b3edd
commit a19d0a3d48
5 changed files with 149 additions and 86 deletions

View File

@@ -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)
{