JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "XSendFileResponse.php"

Full Path: /home/markqprx/iniasli.pro/Files/Response/XSendFileResponse.php
File size: 630 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Common\Files\Response;

use Common\Files\FileEntry;

class XSendFileResponse implements FileResponse
{
    /**
     * @param FileEntry $entry
     * @param array $options
     * @return mixed
     */
    public function make(FileEntry $entry, $options)
    {
        $path = storage_path('app/uploads').'/'.$entry->getStoragePath($options['useThumbnail']);
        $disposition = $options['disposition'];
        header("X-Sendfile: $path");
        header("Content-Type: {$entry->mime}");
        header("Content-Disposition: $disposition; filename=\"".$entry->getNameWithExtension().'"');
        exit;
    }
}