Skip to content

Commit 839e4ad

Browse files
committed
e
1 parent 2465eb0 commit 839e4ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Services/AttachmentService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Carbon\Carbon;
66
use Illuminate\Database\Eloquent\Model;
77
use Illuminate\Http\UploadedFile;
8+
use Illuminate\Support\Facades\Storage;
89
use Intervention\Image\Facades\Image;
910

1011

@@ -65,9 +66,10 @@ public function upload($file, $path)
6566

6667
$fileName = now()->timestamp . '-' . $file->getClientOriginalName();
6768

68-
$this->mkdir_if_not_exists($destinationPath);
69+
// $this->mkdir_if_not_exists($destinationPath);
6970

70-
$file->move($destinationPath, $fileName);
71+
//$this->disk()->put();
72+
$this->disk()->putFileAs($destinationPath, $file, $fileName);
7173

7274
return $destinationPath . $this->ds . $fileName;
7375
}
@@ -83,7 +85,7 @@ public function uploadImage(UploadedFile $uploadedFile, $path = null)
8385
{
8486
// $image = Image::make($uploadedFile->getRealPath());
8587
}
86-
88+
8789
public function isFile($file): bool
8890
{
8991
return true;

0 commit comments

Comments
 (0)