orca's avatar
Level 1

Handling connection error

Currently I tried using Laravel storage (https://laravel.com/docs/5.1/filesystem). I'm using Storage::disk($diskType)->put($filename,$content); to upload a file to remote host. Is there any method I can use to handle error during uploading process (e.g. disconnected from internet)? similar to if(Storage::disk($diskType)->put($filename,$content)){ $txt = "Success"; } else { $txt = "Failed"; } return $txt;

0 likes
1 reply
orca's avatar
Level 1

The problem's been solved using standard try catch (it seems that the error is caused by other parts of my code)

Please or to participate in this conversation.