Commit 38936c52 by Aan Choesni Herlingga

bug fix download file

parent acc65b55
...@@ -43,7 +43,7 @@ class DownloadController extends Controller ...@@ -43,7 +43,7 @@ class DownloadController extends Controller
$fileModel = new File; $fileModel = new File;
$fileRepo = new FileRepository($fileModel); $fileRepo = new FileRepository($fileModel);
$dbfile = $fileRepo->findId($id); $dbfile = File::find($id);
if ($setting['external_storage'] == 1) { if ($setting['external_storage'] == 1) {
$file = $setting['url_static'] . '/' . $setting['directory'] . '/file/' . $dbfile->file; $file = $setting['url_static'] . '/' . $setting['directory'] . '/file/' . $dbfile->file;
...@@ -51,8 +51,6 @@ class DownloadController extends Controller ...@@ -51,8 +51,6 @@ class DownloadController extends Controller
$file = url('/storage/file/' . $dbfile->file); $file = url('/storage/file/' . $dbfile->file);
} }
// dd($file);
$fileRepo->countDownload($dbfile); $fileRepo->countDownload($dbfile);
// if ($fileRepo->is_url_exist($file)) { // if ($fileRepo->is_url_exist($file)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment