-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working within Shared Drives #1
Comments
Try to never use |
@erikn69 Thanks for the response. I have done that too but it only creates the directory then still gives me the error "Unable to read file from location: [shared drive id]/Sub Folder 1. File not found". It seems like it won't do anything INSIDE of a folder that is inside of a Shared Drive. It will only create new files in the root of the Shared Drive itself. |
Weird, i'm using team drives without problems |
Did you config team drives?? |
I have the shared drive ID store to "GOOGLE_DRIVE_TEAM_DRIVE_ID" in my env file. I have my "GOOGLE_DRIVE_FOLDER" left set as "GOOGLE_DRIVE_FOLDER=". To be clear, this used Google Shared Drives since "Team Drives" is not longer a thing. |
I did notice that if I specify something like "GOOGLE_DRIVE_FOLDER='files'" in my env file then it works but it's creating it using the following structure:
|
maybe you have to remove |
Nope, still doesn't seem to do it, unfortunately |
do this on //'folder' => env('GOOGLE_DRIVE_FOLDER ') |
I don't understand that here is my config 'google' => [
'driver' => 'google',
'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'),
'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'),
'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'),
'teamDriveId' => env('GOOGLE_DRIVE_TEAM_DRIVE_ID'),
], And my provider $adapter = new \Masbug\Flysystem\GoogleDriveAdapter($service, $config['folder'] ?? '/', $options); On default folder is |
Google doesn't speak much too it but it seems like more of a "name change" vs actual differences in how it functions I think but notably, the API docs call out that supportsTeamDrives has been replaced by supportsAllDrives: https://developers.google.com/drive/api/v3/reference/files/create?hl=en_US |
On default folder must be '/',
|
my config:
My provider's boot:
|
I really don't know, it is working for me, sorry |
Hi, i have time now, and i did test this 'google' => [
'driver' => 'google',
'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'),
'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'),
'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'),
'folder' => env('GOOGLE_DRIVE_FOLDER'),
] .env
Look at this app, it works on a shared folder laravel-google-drive-ext-demo/routes/web.php Lines 107 to 110 in dffe2fe
|
Hello - I'm thinking this is less of an issue and more of just me not understanding but I'm trying to work within Shared Drives and not having any luck. The structure I'm going for is:
Shared Drive
I've been able to use
Storage::disk('google')->makeDirectory('Sub Folder 1')
and that works fine. The problem comes when I try to useStorage::disk('google')->put('Sub Folder 1/File 1.txt', 'Hello World');
- In this case it ends up creating a second "Sub Folder 1" and then I get the error in Laravel saying "Unable to read file from location: [shared drive id]/Sub Folder 1. File not found"How do I go about utilizing the standard Laravel Storage Facade inside of folders within a shared drive?
Thanks in advance!
The text was updated successfully, but these errors were encountered: