X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e639600ba5909941db97fdd3a4df4220d80f4c7a..refs/pull/806/head:/app/Attachment.php diff --git a/app/Attachment.php b/app/Attachment.php index fe291bec2..55344cd7d 100644 --- a/app/Attachment.php +++ b/app/Attachment.php @@ -1,6 +1,5 @@ name, '.')) return $this->name; + if (str_contains($this->name, '.')) { + return $this->name; + } return $this->name . '.' . $this->extension; } @@ -32,5 +33,4 @@ class Attachment extends Ownable { return baseUrl('/attachments/' . $this->id); } - }