Merge branch 'saas' into saas-media-refactor
Conflicts: airtime_mvc/application/cloud_storage/ProxyStorageBackend.php airtime_mvc/application/controllers/ApiController.php
This commit is contained in:
commit
3a1141d4c8
42 changed files with 9042 additions and 145 deletions
|
@ -33,19 +33,6 @@ class Amazon_S3StorageBackend extends StorageBackend
|
|||
return $this->s3Client->getObjectUrl($this->getBucket(), $resourceId, '+60 minutes');
|
||||
}
|
||||
|
||||
public function getFileSize($resourceId)
|
||||
{
|
||||
$obj = $this->s3Client->getObject(array(
|
||||
'Bucket' => $this->getBucket(),
|
||||
'Key' => $resourceId,
|
||||
));
|
||||
if (isset($obj["ContentLength"])) {
|
||||
return (int)$obj["ContentLength"];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function deletePhysicalFile($resourceId)
|
||||
{
|
||||
$bucket = $this->getBucket();
|
||||
|
|
|
@ -18,12 +18,6 @@ class FileStorageBackend extends StorageBackend
|
|||
return "";
|
||||
}
|
||||
|
||||
public function getFileSize($resourceId)
|
||||
{
|
||||
//TODO
|
||||
return filesize($resourceId);
|
||||
}
|
||||
|
||||
public function deletePhysicalFile($resourceId)
|
||||
{
|
||||
//TODO
|
||||
|
|
|
@ -43,11 +43,6 @@ class ProxyStorageBackend extends StorageBackend
|
|||
return $this->storageBackend->getSignedURL($resourceId);
|
||||
}
|
||||
|
||||
public function getFileSize($resourceId)
|
||||
{
|
||||
return $this->storageBackend->getFileSize($resourceId);
|
||||
}
|
||||
|
||||
public function deletePhysicalFile($resourceId)
|
||||
{
|
||||
$this->storageBackend->deletePhysicalFile($resourceId);
|
||||
|
|
|
@ -17,9 +17,6 @@ abstract class StorageBackend
|
|||
* privately stored on the storage backend. */
|
||||
abstract public function getSignedURL($resourceId);
|
||||
|
||||
/** Returns the file's size in bytes. */
|
||||
abstract public function getFileSize($resourceId);
|
||||
|
||||
/** Deletes the file from the storage backend. */
|
||||
abstract public function deletePhysicalFile($resourceId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue