Skip to content

Commit

Permalink
Revert "Change filePath to real path if it's an upload (#4132)" (#4201)
Browse files Browse the repository at this point in the history
This reverts commit dedf198.
  • Loading branch information
isaacdew2 authored Sep 7, 2024
1 parent 3571496 commit 2fd6e3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Files/TemporaryFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ public function sync(): TemporaryFile
public function copyFrom($filePath, string $disk = null): TemporaryFile
{
if ($filePath instanceof UploadedFile) {
$filePath = $filePath->getRealPath();
}

if ($disk === null && realpath($filePath) !== false) {
$readStream = fopen($filePath->getRealPath(), 'rb');
} elseif ($disk === null && realpath($filePath) !== false) {
$readStream = fopen($filePath, 'rb');
} else {
$diskInstance = app('filesystem')->disk($disk);
Expand Down

0 comments on commit 2fd6e3e

Please sign in to comment.