-<?php namespace BookStack\Uploads;
+<?php
+
+namespace BookStack\Uploads;
use BookStack\Entities\Models\Page;
use BookStack\Model;
/**
* Get the downloadable file name for this upload.
+ *
* @return mixed|string
*/
public function getFileName()
if (strpos($this->name, '.') !== false) {
return $this->name;
}
+
return $this->name . '.' . $this->extension;
}
if ($this->external && strpos($this->path, 'http') !== 0) {
return $this->path;
}
+
return url('/attachments/' . $this->id . ($openInline ? '?open=true' : ''));
}
*/
public function htmlLink(): string
{
- return '<a target="_blank" href="'.e($this->getUrl()).'">'.e($this->name).'</a>';
+ return '<a target="_blank" href="' . e($this->getUrl()) . '">' . e($this->name) . '</a>';
}
/**
*/
public function markdownLink(): string
{
- return '['. $this->name .']('. $this->getUrl() .')';
+ return '[' . $this->name . '](' . $this->getUrl() . ')';
}
}