Skip to content

Commit 2fd6e3e

Browse files
authored
Revert "Change filePath to real path if it's an upload (#4132)" (#4201)
This reverts commit dedf198.
1 parent 3571496 commit 2fd6e3e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Files/TemporaryFile.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ public function sync(): TemporaryFile
5353
public function copyFrom($filePath, string $disk = null): TemporaryFile
5454
{
5555
if ($filePath instanceof UploadedFile) {
56-
$filePath = $filePath->getRealPath();
57-
}
58-
59-
if ($disk === null && realpath($filePath) !== false) {
56+
$readStream = fopen($filePath->getRealPath(), 'rb');
57+
} elseif ($disk === null && realpath($filePath) !== false) {
6058
$readStream = fopen($filePath, 'rb');
6159
} else {
6260
$diskInstance = app('filesystem')->disk($disk);

0 commit comments

Comments
 (0)