Skip to content

Commit

Permalink
merge changes from #571 #785 #1269
Browse files Browse the repository at this point in the history
  • Loading branch information
austintoddj committed May 24, 2023
1 parent e48c617 commit 9888c06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Canvas;

use Canvas\Models\User;
use Composer\InstalledVersions;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use RuntimeException;
Expand All @@ -20,9 +21,7 @@ public static function installedVersion(): string
return '';
}

$dependencies = json_decode(file_get_contents(base_path('composer.lock')), true)['packages'];

return collect($dependencies)->firstWhere('name', 'austintoddj/canvas')['version'];
return InstalledVersions::getPrettyVersion('austintoddj/canvas');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/UploadsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function store()
// are not supported at this time
$file = reset($payload);

$path = $file->storePublicly(Canvas::baseStoragePath(), [
$path = $file->store(Canvas::baseStoragePath(), [
'disk' => config('canvas.storage_disk'),
]);

Expand Down

0 comments on commit 9888c06

Please sign in to comment.