forked from GNUsocial/gnu-social
[ENTITY] Add utils to Attachment and AttachmentThumbnail to get the corresponding URL and html representation parameters
This commit is contained in:
@@ -233,6 +233,11 @@ class Attachment extends Entity
|
||||
return Common::config('attachments', 'dir') . $this->getFilename();
|
||||
}
|
||||
|
||||
public function getAttachmentUrl()
|
||||
{
|
||||
return Router::url('attachment_thumbnail', ['id' => $this->getAttachmentId(), 'w' => Common::config('attachment', 'width'), 'h' => Common::config('attachment', 'height')]);
|
||||
}
|
||||
|
||||
public static function schemaDef(): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user