-
Notifications
You must be signed in to change notification settings - Fork 157
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
Example needed for dealing with Google Cloud Storage with Gaufrette #123
Comments
There is PR on that... this is the proposed fork to be merged... This is the PR link... Please accept the PR. ping @Einenlum @l3l0 @Herzult @iampersistent @Palleas @pilot @Karisch @stof |
Since the PR is merged, is it clear to you? You need to configure GCS like described in the README: https://github.com/KnpLabs/KnpGaufretteBundle#googlecloudstorage Then it's similar from the step Implementing an uploader in your linked tutorial with gaufrette and AWS S3. |
Thank you so much @patkar for your help. I am trying to configure it but without success. The given configuration is deprecated for symfony 2.7.
I am getting an error telling me that
Notice that the list of the working knp services in my symfony project are:
Can you @patkar give me the correct config of the bundle for google cloud storage? Is there any thing else missing? Thanks... Forget that post. |
I tried many time to config the bundle but without success. So I am here back with all my trials below. This is the config:
The error message I got is: ContextErrorException in GoogleCloudStorageAdapterFactory.php line 16: According to the error message, I gave a string of stead of ContainerBuilder. Great! Let's add the ContainerBuilder to the arguments as follows:
The result is again an error: Catchable Fatal Error: Argument 1 passed to Knp\Bundle\GaufretteBundle\DependencyInjection\Factory\GoogleCloudStorageAdapterFactory::create() must be an instance of Symfony\Component\DependencyInjection\ContainerBuilder, instance of appDevDebugProjectContainer given, called in /home/amine/NetBeansProjects/tuto/app/cache/dev/appDevDebugProjectContainer.php on line 724 and defined So now, the error is telling me that I provide an instance of appDevDebugProjectContainer in stead of ContainerBuilder!! Ok, let's have a look to
I am really lost... |
As said in the readme, you have to create your own factory class. The It's a bit more complex than Amazon S3, because the An example how creating the client, auth, etc. works is in the Gaufrette library itself: https://github.com/KnpLabs/Gaufrette#using-googlecloudstorage |
Thank you so much @patkar It is working now (no symfony errors displayed & I have to check the uploads after because now I have to go to work). I have to tell that I misunderstood your readme. This is the class of the service I have created:
Do you think that there will be changes if the code will run on Google Compute engine? Thanks |
Ok, it works. But you should not extend If you run on google compute engine, you can set the scopes on the instance and get the auth token, without to have any credentials in the code: https://cloud.google.com/compute/docs/authentication |
Thank you so much @patkar |
Good morning,
I am uploading my files locally through VichUploaderBundle. Every thing works perfectly.
Now I want no more store my files locally: I want to store them on Google Cloud Storage. I found that KnpGaufretteBundle could be used for storing files in the cloud.
So, is there any example or a example's link on how to configure Gaufrette or KnpGaufretteBundle for storing/uploading/reading files on
google-cloud-storage
?The only thing I found is that link which is an adapter class for GoogleCloudStorage.
I found another link regarding this issue but it proposes an example for storing files on
amazon-s3
: upload-files-to-amazon-s3-with-symfony2-and-gaufretteThanks for you help...
The text was updated successfully, but these errors were encountered: