mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added front-end toggle and testing of inline attachments
This commit is contained in:
@ -41,12 +41,12 @@ class Attachment extends Model
|
||||
/**
|
||||
* Get the url of this file.
|
||||
*/
|
||||
public function getUrl(): string
|
||||
public function getUrl($openInline = false): string
|
||||
{
|
||||
if ($this->external && strpos($this->path, 'http') !== 0) {
|
||||
return $this->path;
|
||||
}
|
||||
return url('/attachments/' . $this->id);
|
||||
return url('/attachments/' . $this->id . ($openInline ? '?open=true' : ''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user