ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

Support for cloud drivers (Google) #59

Closed LarryBarker closed 4 years ago

LarryBarker commented 5 years ago

What version of Laravel are you using? (nothing lower than v5.4).

5.7

is it an issue related to installation or usage ?

Usage

what is the error you are getting ?

Driver [gcs] is not supported.

Extra Info "attaching a screen shot would be very helpful"

From what I can tell, I have the Google Cloud Services driver implemented because I can the following code works:

// Testing of creating a directory 
Storage::disk('gcs')->makeDirectory($request->getRequestUri());

Storage::disk('gcs')->put($request->getRequestUri() . '/file.txt', 'Contents of this file.');

When I change the 'storage_disk' config value to 'gcs' and try to run php artisan config:cache the error is returned.

Do You Know A Solution For this Issue ?

Not currently. I am trying to work though the issue and would like some feedback.

ctf0 commented 5 years ago

so far i hve only tried the package with aws-s3, however can u make a test repo with ur gcs setup and send me the link ?

also if you are facing the same issue with other disk drivers, plz open a new ticket per each :+1:

LarryBarker commented 5 years ago

I'm not sure if I can do that because it uses our company Google credentials. Do you have a set of Google credentials you could use?

ctf0 commented 5 years ago

i can setup a one np, just make sure the repo have everything except the creds

LarryBarker commented 5 years ago

Ok, one sec let me clean up the environment file and what not and get the repo setup.

ctf0 commented 5 years ago

ok, btw have u tried other cloud disks ex.s3 ?

LarryBarker commented 5 years ago

No, I don't have access to any credentials for them.

I'm having a hard time getting this repo setup. It keeps wanting to creating it under my organization and then won't let me push anything.

ctf0 commented 5 years ago

f*ck, mmmm, i will try to do a test on my end later, btw i think there are more than a package for the gcs driver and laravel, which one r u using ?

LarryBarker commented 5 years ago

Just went with the most common one, superbalist/laravel-google-cloud-storage. Like I said, I know its working because I can run:

// Testing of creating a directory 
Storage::disk('gcs')->makeDirectory($request->getRequestUri());

Storage::disk('gcs')->put($request->getRequestUri() . '/file.txt', 'Contents of this file.');

There seems to be something else causing an issue, and the error is throwing from Illuminate\Support\FilesystemManager.php

image

Probably the easiest way for you to replicate will be to just follow https://github.com/Superbalist/laravel-google-cloud-storage/#installation. You'll want to make sure you have your .env variables and gc-service-account.json setup and then update config/media-manager.php to use the gcs disk.

ctf0 commented 5 years ago

thanx, i will see what i can do

ctf0 commented 4 years ago

@LarBearrr have u found a solution for it ?

ctf0 commented 4 years ago

i've tried to test with laravel v7 and no matter what package i try

i get the same error

 InvalidArgumentException 

  Driver [gcs] is not supported.

  at vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php:131
    127| 
    128|         if (method_exists($this, $driverMethod)) {
    129|             return $this->{$driverMethod}($config);
    130|         } else {
  > 131|             throw new InvalidArgumentException("Driver [{$name}] is not supported.");
    132|         }
    133|     }
    134| 
    135|     /**

      +12 vendor frames 
  13  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(ctf0\MediaManager\MediaManagerServiceProvider))

      +5 vendor frames 
  19  artisan:37

which shows up when i try to run artisan serve.

as this is an issue with the driver it self & not the manager, i cant provide any extra help.