Bug-fix-patch

System is storing attachments from mail in choose storage medium but not
showing in timeline #344
This commit is contained in:
Manish Verma
2017-01-25 13:12:23 +05:30
parent 5c5349a411
commit f4d71f3d74

View File

@@ -46,7 +46,7 @@ class Ticket_attachments extends Model
$units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',').' '.$units[$power];
if ($this->poster == 'ATTACHMENT') {
if ($this->poster == 'ATTACHMENT' || $this->poster == 'attachment') {
if (mime($this->type) == 'image') {
$var = '<a href="'.\URL::route('image', ['image_id' => $this->id]).'" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,'.$this->file.'"/></a>';