SAAS-596: Store file size and hash in database
Have pypo fetch the file size and md5, if necessary, and make request to Airtime to set these values
This commit is contained in:
parent
47a7b0245e
commit
be7a6854f0
3 changed files with 47 additions and 7 deletions
|
@ -564,7 +564,10 @@ SQL;
|
|||
public function getFileSize()
|
||||
{
|
||||
$filesize = $this->_file->getFileSize();
|
||||
if ($filesize <= 0) {
|
||||
|
||||
// It's OK for the file size to be zero. Pypo will make a request to Airtime and update
|
||||
// the file size and md5 hash if they are not set.
|
||||
if ($filesize < 0) {
|
||||
throw new Exception ("Could not determine filesize for file id: ".$this->_file->getDbId().". Filesize: ".$filesize);
|
||||
}
|
||||
return $filesize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue