Skip to content

Commit

Permalink
Use fopen instead of file_get_contents
Browse files Browse the repository at this point in the history
  • Loading branch information
yadakhov committed May 27, 2023
1 parent d951ecf commit c46aeea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Commands/SaveToS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public function handle()
$s3Path = $this->s3Prefix . '/' . $relativePath;

$this->info("Saving file {$relativePath} to {$s3Path}");
$fileContents = file_get_contents($file);
Storage::disk('s3')->put($s3Path, $fileContents);
$fileStream = fopen($file, 'r');
Storage::disk('s3')->put($s3Path, $fileStream);
}
}
}

0 comments on commit c46aeea

Please sign in to comment.