Merge pull request #14767 from bmspereira-07/3.x

Fixed bug on windows where the system puts \ instead of / while forming the s3 url (Import action).
This commit is contained in:
Dan Harrin
2024-11-12 09:37:10 +00:00
committed by GitHub
@@ -397,7 +397,8 @@ trait CanImportRecords
$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' => [