Skip to content

Commit d36f59a

Browse files
committed
Correct storage base
1 parent 264fa2c commit d36f59a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Config/Files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Files extends BaseConfig
99
*
1010
* @var string
1111
*/
12-
public $storagePath = ROOTPATH . 'writable/files/';
12+
public $storagePath = WRITEPATH . 'files/';
1313

1414
/**
1515
* Layouts to use for general access and for administration

src/Models/FileModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function createFromFile(CIFile $file, string $originalName = null): File
158158

159159
// Normalize paths
160160
$storage = self::storage();
161-
$filePath = $file->getRealPath() ?: $file->__toString();
161+
$filePath = $file->getRealPath() ?: (string) $file;
162162

163163
// Determine if we need to move the file
164164
if (strpos($filePath, $storage) === false)
@@ -183,7 +183,7 @@ public function createFromFile(CIFile $file, string $originalName = null): File
183183

184184
try
185185
{
186-
service('thumbnails')->create($file->__toString(), $output);
186+
service('thumbnails')->create((string) $file, $output);
187187

188188
// If it succeeds then update the database
189189
$this->update($fileId, [

0 commit comments

Comments
 (0)