First get logged in to a GCE instance via SSH. From there you can access the Storage with the help of a Service Account:
Step 1: Open Command line of google app engine and enter following command.
$ sudo gcloud auth login
Step 2: Login to gmail by copying the url for authentication and after login with gmail you will get the code. Copy the code and paste it and hit enter
Step 3: Now Write the following command
$sudo gsutil cp /var/www/sliderVideos/thumb/201504100904091029698703.png gs://amuk
Write the following code in php to test, whether you are able to copy the files to directory to "amuk" directory created in google storage (Google App Engine)
<?php
$output = exec ('sudo gsutil cp /var/www/sliderVideos/thumb/201504100904091029698703.png gs://amuk');
echo "<pre>$output</pre>";
?>
Now you can see that you are able to access the storage account. Please have a look on the screen shots attached below
0 Comment(s)