Skip to content

Commit

Permalink
Fixes issue with incorrect temp file path
Browse files Browse the repository at this point in the history
  • Loading branch information
dbalabka authored and damonsson committed Dec 27, 2019
1 parent 90dce52 commit a9e908c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Downloader/ImageDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function download(string $url): File
{
$pathInfo = pathinfo($url);
$extension = $pathInfo['extension'];
$path = sys_get_temp_dir() . md5(random_bytes(10)) . '.' . $extension;
$path = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . md5(random_bytes(10)) . '.' . $extension;

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

Expand Down

0 comments on commit a9e908c

Please sign in to comment.