Skip to content

Commit

Permalink
Merge pull request #14767 from bmspereira-07/3.x
Browse files Browse the repository at this point in the history
Fixed bug on windows where the system puts \ instead of / while forming the s3 url (Import action).
  • Loading branch information
danharrin authored Nov 12, 2024
2 parents dbcfe74 + aecbc3f commit 46d3da5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/actions/src/Concerns/CanImportRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ public function getUploadedFileStream(TemporaryUploadedFile $file)
$s3Adapter = Storage::disk($fileDisk)->getAdapter();

invade($s3Adapter)->client->registerStreamWrapper(); /** @phpstan-ignore-line */
$fileS3Path = 's3://' . config("filesystems.disks.{$fileDisk}.bucket") . '/' . $filePath;

$fileS3Path = (string) str('s3://' . config("filesystems.disks.{$fileDisk}.bucket") . '/' . $filePath)->replace('\\', '/');

$resource = fopen($fileS3Path, mode: 'r', context: stream_context_create([
's3' => [
Expand Down

0 comments on commit 46d3da5

Please sign in to comment.