Skip to content

Commit

Permalink
Merge pull request #23 from sr-44/master
Browse files Browse the repository at this point in the history
Fix saveFileToDisk() method
  • Loading branch information
Lukasss93 authored Mar 10, 2024
2 parents bfe28ae + ff906b6 commit fc25894
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mixins/MixinUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public static function saveFileToDisk(File $file, string $path, ?string $disk =
$path .= basename($file->file_path ?? $file->file_id);
}

if ($bot->getConfig()->is_local ?? false) {
return $storage->put($path, $bot->downloadUrl($file));
if ($bot->getConfig()->isLocal ?? false) {
return copy(from: $bot->downloadUrl($file), to: $storage->path($path));
}

//create temp file
Expand Down

0 comments on commit fc25894

Please sign in to comment.