forked from GNUsocial/gnu-social
[Media] File quota should be triggered by the Core
This commit is contained in:
@@ -23,6 +23,7 @@ namespace App\Entity;
|
||||
|
||||
use App\Core\DB\DB;
|
||||
use App\Core\Entity;
|
||||
use App\Core\GSFile;
|
||||
use App\Util\Common;
|
||||
use DateTimeInterface;
|
||||
|
||||
@@ -126,6 +127,18 @@ class Attachment extends Entity
|
||||
return $this->mimetype;
|
||||
}
|
||||
|
||||
public function getMimetypeMajor(): ?string
|
||||
{
|
||||
$mime = $this->getMimetype();
|
||||
return is_null($mime) ? $mime : GSFile::mimetypeMajor($mime);
|
||||
}
|
||||
|
||||
public function getMimetypeMinor(): ?string
|
||||
{
|
||||
$mime = $this->getMimetype();
|
||||
return is_null($mime) ? $mime : GSFile::mimetypeMinor($mime);
|
||||
}
|
||||
|
||||
public function setTitle(?string $title): self
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
Reference in New Issue
Block a user