Blobstore on GAE PHP

2019-06-11 04:10发布

I start to use GAE with PHP. On documentation we can't find any information about Blobstore.

So the only way to upload image it's to upload image on PHP application is Cloud Storage ?

Thx

Samuel

3条回答
放我归山
2楼-- · 2019-06-11 04:18

PHP in GAE is in experimental stage and for now not every API is available. There's no ETA. You can try to make for example python "backend" that will handle your blobs and call it from your PHP side.

查看更多
我想做一个坏孩纸
3楼-- · 2019-06-11 04:28

In the current PHP SDK (1.89), in the PHP libs directory (<path to>\Google\google_appengine\php\sdk\google\appengine\api\blobstore) you can see that there is a blobstore directory, and a single blobstore_service_pb.php file. It is missing the BlobstoreService.php and BlobstoreException.php files.

However, you can get pre-release version from googles git site:

https://chromium.googlesource.com/external/googleappengine/python/+/b90ec6c60be569887e4905737fc5b2fedd9fe336%5E/php/sdk/google/appengine/api/blobstore/

Download the two required files, stick it in your Google appengine SDK blobstore directory and use it.

require_once 'google/appengine/api/blobstore/BlobstoreService.php';
use google\appengine\api\blobstore

Works locally on the development server... Not sure if the files exist on the actual app engine service, as I haven't pushed a test app to the servers yet.

查看更多
forever°为你锁心
4楼-- · 2019-06-11 04:34

Yes no blobstore - only persistent storage is Google Cloud Storage.

查看更多
登录 后发表回答