【发布时间】:2015-01-01 17:03:14
【问题描述】:
我有一个名为 "test-my-app1" 的文件夹,其中包含我用于 google 应用引擎的应用。该文件夹中有一个名为 img 的文件夹,用于存储我的应用程序 CSS 的所有图像,还有一个名为 profile 的文件夹。在名为 profile (test-my-app1/img/profile/) 的文件夹中,用户可以为他的个人资料图片上传照片。
我使用的 php 脚本成功地适用于我笔记本电脑中的 XAMPP。问题是当我在应用引擎中运行脚本时,图像没有上传到我的文件夹“配置文件”中。这是我的应用 yaml 文件:
application: test-my-app1
version: 1
runtime: php
api_version: 1
handlers:
- url: /img
static_dir: img
- url: /profile/(.*\.(gif|png|jpg))
static_files: profile/\1
upload: profile/(.*\.(gif|png|jpg))
知道如何解决吗?这里有一个可能的答案:App Engine PHP upload file我的问题,但没有解决我的问题
【问题讨论】:
-
我可能是用户上传需要使用Google App Engine的特殊服务cloud.google.com/appengine/docs/php/googlestorage/user_upload
标签: google-app-engine image-uploading app.yaml