Skip to content

Commit f7676a7

Browse files
authored
Update Image.php
1 parent 023572a commit f7676a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Conversion/Image.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Cone\Root\Models\Medium;
88
use Exception;
99
use GdImage;
10+
use Illuminate\Support\Facades\Config;
1011
use Illuminate\Support\Facades\Storage;
1112
use Illuminate\Support\Str;
1213

@@ -48,7 +49,12 @@ public function __construct(Medium $medium)
4849
{
4950
$this->medium = $medium;
5051

51-
$this->path = Storage::disk('local')->path('root-tmp/'.Str::random(40));
52+
$disk = Storage::build([
53+
'driver' => 'local',
54+
'root' => Config::get('root.media.tmp_dir'),
55+
]);
56+
57+
$this->path = $disk->path(Str::random(40));
5258

5359
$this->type = exif_imagetype($medium->getAbsolutePath());
5460

0 commit comments

Comments
 (0)