2
votes

I'm trying to figure out how to let my users upload files in my Google App Engine app. I'm following the instructions here: https://cloud.google.com/appengine/docs/standard/php/googlestorage/user_upload

It starts with:

use google\appengine\api\cloud_storage\CloudStorageTools;

However, that package doesn't exist in any of the vendor directories I've got and I can't figure out what I need to add to my composer.json in order to get this code.

I've got code in other places in my project that will use Google\Cloud\Storage\StorageClient; but that is a different code base and it doesn't contain the CloudStorageTools::createUploadUrl() function which is what I'm trying to get access to.

enter image description here

enter image description here

Here is what my composer.json contains:

{
  "require": {
    "mailgun/mailgun-php": "^2.6",
    "php-http/guzzle6-adapter": "^1.1",
    "php-http/message": "^1.6",
    "google/cloud-storage": "^1.9",
    "google/cloud-debugger": "^0.14.2",
    "ext-stackdriver_debugger": "*"
  },
  "name": "",
  "description": ""
}
1
Looks like you need to add google/appengine-php-sdk in Your composer.json github.com/GoogleCloudPlatform/appengine-php-sdk/blob/master/… - dev-null-dweller
Yes! That was it. If you post this as the answer, I'll accept it. - Kenny Wyland

1 Answers

3
votes

You need to add google/appengine-php-sdk to your composer.json.

composer require google/appengine-php-sdk