google-app-engine

java.security.AccessControlException: File accessible thru browser but not within same server

ε祈祈猫儿з 提交于 2020-01-11 07:17:22
问题 So to not repeat myself too much, please refer to serve static image along side java google-enpoint api. As you can see from the referenced link, I am able to view the image through the url. However, when I am trying to read filenames using similar code to public void listFilesForFolder(final File folder) { for (final File fileEntry : folder.listFiles()) { if (fileEntry.isDirectory()) { listFilesForFolder(fileEntry); } else { System.out.println(fileEntry.getName()); } } } final File folder =

How to import google cloud speech recognition in Google App Engine (python)

假装没事ソ 提交于 2020-01-11 06:50:52
问题 I want to use google.cloud library on my Google App Engine python application. In my local all my tests work since I installed this library on my local. I was expecting it to be supported in GAE by default but it's not supported. This the error I got: from google.cloud import speech ImportError: No module named cloud I had a look at adding 3rd party libraries at https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27 After following the instructions I got

How to import google cloud speech recognition in Google App Engine (python)

若如初见. 提交于 2020-01-11 06:49:11
问题 I want to use google.cloud library on my Google App Engine python application. In my local all my tests work since I installed this library on my local. I was expecting it to be supported in GAE by default but it's not supported. This the error I got: from google.cloud import speech ImportError: No module named cloud I had a look at adding 3rd party libraries at https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27 After following the instructions I got

Set a kind name independently of the model name (App Engine datastore)

烂漫一生 提交于 2020-01-11 06:32:09
问题 As a Python programmer, I like my code to be reusable, I'm trying to avoid kind name conflicts in my code (where two different models share the same kind name). Currently I just prepend some meaningful text to the model's class name, but this is awfully unpythonic. Being able to explicitly set the model's kind will solve my problem, but I can't find out how to do this, does anyone know how? 回答1: Just override the kind() method of your class: class MyModel(db.Model): @classmethod def kind(cls)

How to upload multiple files to BlobStore?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-11 06:16:22
问题 I'm trying to upload multiple files in a form to the BlobStore. Form: <form action="{{upload_url}}" method="POST" enctype="multipart/form-data"> <label>Key Name</label><input type="text" name="key_name" size="50"><br/> <label>name</label><input type="text" name="name" size="50"><br/> <label>image</label><input type="file" name="image" size="50"><br/> <label>thumb</label><input type="file" name="thumb" size="50"><br/> <input type="submit" name="submit" value="Submit"> </form> I'm then trying

How to upload multiple files to BlobStore?

让人想犯罪 __ 提交于 2020-01-11 06:15:10
问题 I'm trying to upload multiple files in a form to the BlobStore. Form: <form action="{{upload_url}}" method="POST" enctype="multipart/form-data"> <label>Key Name</label><input type="text" name="key_name" size="50"><br/> <label>name</label><input type="text" name="name" size="50"><br/> <label>image</label><input type="file" name="image" size="50"><br/> <label>thumb</label><input type="file" name="thumb" size="50"><br/> <input type="submit" name="submit" value="Submit"> </form> I'm then trying

import mechanize module to python script

社会主义新天地 提交于 2020-01-11 05:56:29
问题 I tried to import mechanize module to my python script like this, from mechanize import Browser But, Google appengine throws HTTP 500 when accessing my script. To make things more clear, Let me give you the snapshot of my package structure, root ....mechanize(where all the mechanize related files there) ....main.py ....app.yaml ....image ....script Can anyone help me out to resolve this issue? Thanks, Ponmalar 回答1: The mechanize main page says: mechanize.Browser is a subclass of mechanize

Does Google App Engine support SSL for apps hosted as mydomain.com?

好久不见. 提交于 2020-01-11 05:19:06
问题 From this question I learned that Google App Engine does not currently support SSL on "custom domains" (at least not as of June 2010, when that question was asked). Does this mean if I want to host my GAE app on www.mydomain.com , I cannot use SSL? 回答1: A few days ago it comes into tests. 回答2: Priority: It is at the top of the Features on Deck list. http://code.google.com/appengine/docs/roadmap.html Simultaneous serving: A custom domain hosted app such as http://www.mydomain.com can still be

quotas on appengine search api for java

谁说我不能喝 提交于 2020-01-11 01:50:07
问题 I am testing the new app engine search api for java and I have the following code that tries to add ~3000 documents on an index: List<Document> documents = new ArrayList<Document>(); for (FacebookAlbum album: user.listAllAlbums()) { Document doc = Document.newBuilder() .setId(album.getId()) .addField(Field.newBuilder().setName("name").setText(album.getFullName())) .addField(Field.newBuilder().setName("albumId").setText(album.getAlbumId())) .addField(Field.newBuilder().setName("createdTime")

RESTful API authentication/security

二次信任 提交于 2020-01-10 19:56:47
问题 I'm developing a RESTful API for my app on GAE python and right now I'm trying to figure out the best way to secure this API. I have my own member/authentication mechanism on this app. what is the best way to do this? having public/private key pairs becoming an OAuth provider HTTP authentication (seems very weak to me) other?? 回答1: First, discard HTTP Auth. It is not recommended in a true REST API since it resides on cookies. I would go with OAuth. There's a library called appengine_oauth