We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aa6cd8 commit f8462e3Copy full SHA for f8462e3
1 file changed
src/Fields/Dtos/FileDto.php
@@ -20,18 +20,18 @@ class FileDto extends BaseDto
20
/**
21
* @var ?string
22
*/
23
- public $directory;
+ protected $directory;
24
25
public function getFullPath()
26
{
27
- return $this->directory ? $this->directory . '/' . $this->path : $this->path;
+ $fs = filled($this->disk) ? Storage::disk($this->disk) : Storage::getDriver();
28
+ return $fs->path($this->path);
29
}
30
31
public function getUrl(): ?string
32
33
$fs = filled($this->disk) ? Storage::disk($this->disk) : Storage::getDriver();
-
34
- return $fs->url($this->getFullPath());
+ return $fs->url($this->path);
35
36
37
public function __toString()
0 commit comments