flysystem-google-drive-ext icon indicating copy to clipboard operation
flysystem-google-drive-ext copied to clipboard

useDisplayPaths is false, but return original filename

Open deesouza-ps opened this issue 3 weeks ago • 4 comments

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');

deesouza-ps avatar Jun 21 '24 20:06 deesouza-ps