SAAS-596: Store file size and hash in database
Removed getFileSize from CloudFile.php since it can call the parent function. Moved setting filesize metadata from cloud_storage_uploader.
This commit is contained in:
parent
fe7071b5e3
commit
5bd3371ec2
|
@ -44,14 +44,6 @@ class CloudFile extends BaseCloudFile
|
|||
return $this->proxyStorageBackend->getAbsoluteFilePath($this->getResourceId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the file size in bytes.
|
||||
*/
|
||||
public function getFileSize()
|
||||
{
|
||||
return $this->getDbFilesize();
|
||||
}
|
||||
|
||||
public function getFilename()
|
||||
{
|
||||
return $this->getDbFilepath();
|
||||
|
|
|
@ -62,8 +62,7 @@ class CloudStorageUploader:
|
|||
metadata: ID3 tags and other metadata extracted from the audio file.
|
||||
|
||||
Returns:
|
||||
The metadata dictionary it received with three new keys:
|
||||
filesize: The file's filesize in bytes.
|
||||
The metadata dictionary it received with two new keys:
|
||||
filename: The file's filename.
|
||||
resource_id: The unique object name used to identify the objects
|
||||
on Amazon S3
|
||||
|
@ -95,8 +94,6 @@ class CloudStorageUploader:
|
|||
key.key = resource_id
|
||||
key.set_metadata('filename', file_base_name)
|
||||
key.set_contents_from_filename(audio_file_path)
|
||||
|
||||
metadata["filesize"] = os.path.getsize(audio_file_path)
|
||||
|
||||
# Remove file from organize directory
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue