Skip to content

Commit

Permalink
Use storage facade to get real path (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Jan 16, 2025
1 parent 9d76591 commit 4abeec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/SavesImagesAndMetafields.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ private function getImageNameFromUrl(string $url): string
}

/**
* Make a fake file so Statamic can interpert the data we need.
* Make a fake file so Statamic can interpret the data we need.
*/
public function uploadFakeFileFromUrl(string $name, string $url): UploadedFile
{
Storage::disk('local')->put($name, file_get_contents($url));

return new UploadedFile(realpath(storage_path("app/$name")), $name);
return new UploadedFile(Storage::disk('local')->path($name), $name);
}

/**
Expand Down

0 comments on commit 4abeec9

Please sign in to comment.