File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 33namespace Sammyjo20 \Lasso \Helpers ;
44
55use Illuminate \Support \Facades \Storage ;
6+ use League \Flysystem \UnableToWriteFile ;
67use Sammyjo20 \Lasso \Exceptions \ConsoleMethodException ;
78use Sammyjo20 \Lasso \Helpers \Filesystem as LocalFilesystem ;
89
@@ -64,7 +65,9 @@ public function uploadFile(string $path, string $name): void
6465 $ stream = fopen ($ path , 'rb ' );
6566
6667 // Use the stream to write the bundle to the Filesystem.
67- $ this ->cloudFilesystem ->writeStream ($ upload_path , $ stream );
68+ if ($ this ->cloudFilesystem ->writeStream ($ upload_path , $ stream ) === false ) {
69+ throw new UnableToWriteFile ("Unable to write file at location " . $ upload_path );
70+ }
6871
6972 // Close the Stream pointer because it's good practice.
7073 if (is_resource ($ stream )) {
You can’t perform that action at this time.
0 commit comments