You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my whole app becomes unresponsive. When opening a new browser tab, the page doesn't load before the upload to drive is finished. I assume that the upload to drive burns up my whole upload bandwidth. Is there a throttle option or another way to prevent this from happening?
I'm using drive to store and retrieve images.
Here's my GoogleDriveServiceProvider.php:
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Storage;
use Google\Client;
use Google\Service\Drive;
use Masbug\Flysystem\GoogleDriveAdapter;
use League\Flysystem\Filesystem;
use Illuminate\Filesystem\FilesystemAdapter;
class GoogleDriveServiceProvider extends ServiceProvider
{
public function register()
{
//
}
public function boot()
{
try {
Storage::extend('google', function($app, $config) {
$options = [];
if (!empty($config['teamDriveId'] ?? null)) {
$options['teamDriveId'] = $config['teamDriveId'];
}
$client = new Client();
$client->setClientId($config['clientId']);
$client->setClientSecret($config['clientSecret']);
$client->refreshToken($config['refreshToken']);
$service = new Drive($client);
$adapter = new GoogleDriveAdapter($service, $config['folder'] ?? '/', $options);
$driver = new Filesystem($adapter);
return new FilesystemAdapter($driver, $adapter);
});
} catch(\Exception $e) {
return $e->getMessage();
}
}
}
The text was updated successfully, but these errors were encountered:
When executing this line of code:
my whole app becomes unresponsive. When opening a new browser tab, the page doesn't load before the upload to drive is finished. I assume that the upload to drive burns up my whole
upload bandwidth
. Is there a throttle option or another way to prevent this from happening?I'm using
drive
to store and retrieve images.Here's my
GoogleDriveServiceProvider.php
:The text was updated successfully, but these errors were encountered: