From f7276d6d9af04dea4cce732597870ba98a4312a4 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 5 Aug 2016 01:45:59 +0200 Subject: [PATCH] fixed missing ROOT --- app/File.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/File.php b/app/File.php index aeaf855..0070b09 100644 --- a/app/File.php +++ b/app/File.php @@ -91,7 +91,7 @@ class File ]); // Save the file data - file_put_contents(config('file.uploads_dir') . $id . ".bin", $data); + file_put_contents(ROOT . config('file.uploads_dir') . $id . ".bin", $data); // Return a new File object return new File($id); @@ -114,7 +114,7 @@ class File $fileRow = $fileRow[0]; $this->id = $fileRow->file_id; $this->user = User::construct($fileRow->user_id); - $this->data = file_get_contents(config('file.uploads_dir') . $fileRow->file_id . ".bin"); + $this->data = file_get_contents(ROOT . config('file.uploads_dir') . $fileRow->file_id . ".bin"); $this->name = $fileRow->file_name; $this->mime = $fileRow->file_mime; $this->time = $fileRow->file_time; @@ -127,7 +127,7 @@ class File */ public function delete() { - unlink(config('file.uploads_dir') . $this->id . ".bin"); + unlink(ROOT . config('file.uploads_dir') . $this->id . ".bin"); DB::table('uploads') ->where('file_id', $this->id)