public function download($path, DownloadListener $listener)
    {
        $decoded = Urlcrypt::decode($path);
        $file    = new File($decoded);
        if ($this->isImage($file)) {
            $path    = $file->getRealPath();
            $imgData = base64_encode(file_get_contents($path));
            $src     = 'data: ' . mime_content_type($path) . ';base64,' . $imgData;
            return $this->presenter->show($src);
        }
    }
public function download($path, DownloadListener $listener)
    {
        $decoded = Urlcrypt::decode($path);
        $file    = new File($decoded);
        if ($this->isImage($file)) {
            $path    = $file->getRealPath();
            $imgData = base64_encode(file_get_contents($path));
            $src     = 'data: ' . mime_content_type($path) . ';base64,' . $imgData;
            return $this->presenter->show($src);
        }
    }
public function download ( $ path , DownloadListener $ listener ) { $ decoded = Urlcrypt :: decode ( $ path ) ; $ file = new File ( $ decoded ) ; if ( $ this -> isImage ( $ file ) ) { $ path = $ file -> getRealPath ( ) ; $ imgData = base64_encode ( file_get_contents ( $ path ) ) ; $ src = 'data: ' . mime_content_type ( $ path ) . ';base64,' . $ imgData ; return $ this -> presenter -> show ( $ src ) ; } }
default download action

@param String $path
@param DownloadListener $listener
@return \Illuminate\View\View|\Illuminate\Http\JsonResponse
default download action