Frozennode\Administrator\AdminController::displayFile PHP Метод

displayFile() публичный Метод

The GET method that displays a file field's file.
public displayFile ( ) : Image
Результат Image / File
    public function displayFile()
    {
        //get the stored path of the original
        $path = $this->request->input('path');
        $data = File::get($path);
        $file = new SFile($path);
        $headers = array('Content-Type' => $file->getMimeType(), 'Content-Length' => $file->getSize(), 'Content-Disposition' => 'attachment; filename="' . $file->getFilename() . '"');
        return response()->make($data, 200, $headers);
    }