flysystem-google-drive-ext
flysystem-google-drive-ext copied to clipboard
useDisplayPaths is false, but return original filename
I have this code below.
Same the property useDisplayPaths
with false
, on upload return the original filename.
Storage::extend('google', function ($app, $config) {
$client = new GoogleClient();
$client->setClientId($config['clientId']);
$client->setClientSecret($config['clientSecret']);
$client->refreshToken($config['refreshToken']);
$service = new GoogleServiceDrive($client);
$adapter = new GoogleDriveAdapter($service, $config['folderId'], [
'useDisplayPaths' => false,
]);
$driver = new Filesystem($adapter);
return new FilesystemAdapter($driver, $adapter);
});
Upload
$fileNameUpload = $fileUpload->storeAs('ID_PATH_GOOGLE_DRIVE', $fileName, 'google');