Tag: 谷歌应用程序内引擎

Google使用api javascript / jquery注销

在我的Web应用程序中,我允许用户使用API​​ Client Library中的auth命令登录,但我找不到Google API JavaScript Client Library的Logout选项。 任何人都可以建议我如何退出我的应用程序以及谷歌帐户? 我的登录代码是: var OAUTHURL = ‘https://accounts.google.com/o/oauth2/auth?’; var VALIDURL = ‘https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=’; var SCOPE = ‘https://www.googleapis.com/auth/userinfo.profile’; var CLIENTID = googleAPI; var REDIRECT = redirectUrl; var TYPE = ‘token’; var _url = OAUTHURL + ‘scope=’ + SCOPE + ‘&client_id=’ + CLIENTID + ‘&redirect_uri=’ + REDIRECT + ‘&response_type=’ + TYPE; var acToken; […]

如何播放(流而不是下载)使用Blobstore API存储在GCS中的video文件

如何播放(流而不是下载)存储在GCS中的video文件? 该文件是使用GAE Python中的Blobstore API存储的? 目前,当我在前端使用send_blob返回的url时,video会被下载。 我使用以下服务提供video: video_url = “/v?video_id=”+video_blobkey :: class GCSFileServe(blobstore_handlers.BlobstoreDownloadHandler): def get (self): blob_key = self.request.get(‘video_id’) self.send_blob(blob_key) :: app = webapp2.WSGIApplication([ (‘/’, MainHandler), (‘/v’, GCSFileServe), ], debug=True) 我上传video并存储blobkey: filename = bucket + “/user_video_”+str (user_index) + “_” + str (i) gcs_file = gcs.open (filename, ‘w’, content_type = ‘video/avi’) gcs_file.write (video) gcs_file.close () blobstore_filename = […]

将文件从Javascript上传到Google Cloud Endpoint

我正在使用HTML5 + Javascript + jQueryMobile创建一个Web应用程序,我想使用我创建的Google Cloud Endpoint将文件上传到Google App Engine Web应用程序。 当我控制双方时,我可以(并且希望)创建最简单的交互。 至于端点,我想到了创建这样的方法: @ApiMethod( name = “uploadFile”, path = “upload_file”, httpMethod = HttpMethod.POST ) public void uploadFile(File file) { //process the file } 这个File类可以包含一个类型为Blob的字段fileData ,或者byte []或者类似的东西,重新显示文件数据…类似于: public class File { private String fileName; private long fileSize; private Blob fileData; //getters and setters } 所以第一个问题是: 这个字段 fileData […]

Google App Engine + jQuery Ajax = 405方法不允许

有人必须能够解释我在这里做错了什么! 我正在尝试为Google App Engine应用程序创建最简单的AJAXpost示例…而且我失败了! 这是应用程序python import cgi from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from django.utils import simplejson class EmailItem(db.Model): email = db.StringProperty(multiline=False) date = db.DateTimeProperty(auto_now_add=True) class EmailList(webapp.RequestHandler): def get(self): self.response.out.write(“You see nothing!”) def post(self): eitem = EmailItem() eitem.email = self.request.get(“address”) eitem.put() self.response.out.write(“success”) application = webapp.WSGIApplication([(‘/’, […]