ivanvermeyen / laravel-google-drive-demo

Laravel & Google Drive Storage - Demo project with Laravel 5.4
405 stars 155 forks source link

Storage::cloud()->listContents() Not working for more than 2k directory #92

Open daptontdev1 opened 3 years ago

daptontdev1 commented 3 years ago

I am getting fail most of the time for the 2k directory when I am trying to check the directory already exists? but getting a fail response

   $contents = collect(Storage::listContents());
    $dir = $contents->where('type', '=', 'dir')->where('filename', '=', $directory)->first();
    if (! $dir) {
        // Create parent dir
        Storage::makeDirectory($path.'/'.$directory);
     }
ivanvermeyen commented 3 years ago

Do you get a specific exception or error message? My guess would be that the request takes too long and times out? I think for bigger projects a more direct use of the Google API would be better...

daptontdev1 commented 3 years ago

Not getting a specific error. Yes, it takes too long and it might be timed out. I am going with Google API. Thanks a lot for your feedback.

pankajthakur007 commented 3 years ago

@daptontdev1 you need the use pagination