Conditions | 5 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
52 | protected function storageDownload(string $path): StreamedResponse|RedirectResponse|null |
||
53 | { |
||
54 | if (isset($this->file) and $this->file == LARUPLOAD_NULL) { |
||
55 | return null; |
||
56 | } |
||
57 | |||
58 | if ($this->driverIsLocal()) { |
||
59 | return Storage::disk($this->disk)->download($path); |
||
60 | } |
||
61 | |||
62 | $baseUrl = config("filesystems.disks.$this->disk.url"); |
||
63 | |||
64 | if ($baseUrl) { |
||
65 | return redirect("$baseUrl/$path"); |
||
66 | } |
||
67 | |||
68 | return null; |
||
69 | } |
||
71 |