Skip to content

Commit a9e908c

Browse files
dbalabkadamonsson
authored andcommitted
Fixes issue with incorrect temp file path
1 parent 90dce52 commit a9e908c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Downloader/ImageDownloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function download(string $url): File
2929
{
3030
$pathInfo = pathinfo($url);
3131
$extension = $pathInfo['extension'];
32-
$path = sys_get_temp_dir() . md5(random_bytes(10)) . '.' . $extension;
32+
$path = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . md5(random_bytes(10)) . '.' . $extension;
3333

3434
$this->filesystem->dumpFile($path, file_get_contents($url));
3535

0 commit comments

Comments
 (0)