laravel-6 support
This commit is contained in:
@@ -2,18 +2,18 @@
|
||||
|
||||
namespace UniSharp\LaravelFilemanager\Controllers;
|
||||
|
||||
/**
|
||||
* Class DownloadController.
|
||||
*/
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class DownloadController extends LfmController
|
||||
{
|
||||
/**
|
||||
* Download a file.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDownload()
|
||||
{
|
||||
return response()->download(parent::getCurrentPath(request('file')));
|
||||
$file = $this->lfm->setName(request('file'));
|
||||
|
||||
if (!Storage::disk($this->helper->config('disk'))->exists($file->path('storage'))) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return response()->download($file->path('absolute'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user