blobstore

How do I integrate filepicker.io with google app engine (blobstore)?

半腔热情 提交于 2019-12-10 15:27:20
问题 So I'm trying to use filepicker.io with a GAE application. The filepicker widget returns the URL of the file that a user uploaded. How do I then use this url to upload the file to GAE's blobstore? The blobstore only supports "file uploading through a form", so the real question is how to fake a form POST containing the URL of a file. 回答1: Faking a form post is possible, but it's much simpler to use the Files API Edit: To use the File API with urlfetch you would write something like this: from

How to display images on html page from python/jinja

拈花ヽ惹草 提交于 2019-12-10 12:18:40
问题 I have created the class Blog in model.py and in that it has an attribute photo which is a BlobkeyProperty . My problem is how to diplay that photo on html page.. all I am getting is just key.I do not know much of Jinja and python so please help.. :) {% if blog.photo == None %} <img src="static/css/img/photo.jpg" /><br/> {% elif blog.photo %} <span>{{blog.photo.key.get()}}</span><br/> {% endif %} the first part is working but the else part is now giving me Internal Server Error(UndefinedError

How to display an image from blobstore?

纵饮孤独 提交于 2019-12-09 20:05:48
问题 I am trying to understand the documentation Using the Images Python API and I am confused about how to get the key and display the avatar. Documentation says that the Image handler will serve the image off the /img path. I am confused about what this Image handler does. I comment below how understand it; please correct. Thanks: class Image (webapp.RequestHandler): def get(self): #get the key of the image "img_id" from datastore #what is the value of "img_id"? Where does it come from? #how

Provide a callback URL in Google Cloud Storage signed URL

↘锁芯ラ 提交于 2019-12-09 16:11:41
问题 When uploading to GCS (Google Cloud Storage) using the BlobStore's createUploadURL function, I can provide a callback together with header data that will be POSTed to the callback URL. There doesn't seem to be a way to do that with GCS's signed URL's I know there is Object Change Notification but that won't allow the user to provide upload specific information in the header of a POST, the way it is possible with createUploadURL's callback. My feeling is, if createUploadURL can do it, there

Directly Putting Data in AppEngine's Blobstore

余生颓废 提交于 2019-12-09 12:48:34
问题 The AppEngine's standard API assumes files are uploaded from an HTML form. I'm trying to post a file to the blobstore from a REST API method that can be called by a non Html client (Flash, iPhone, etc.) The code I'm trying to get working: # Get the blobstore upload url upload_url = blobstore.create_upload_url("/activities/upload_finished"); # Make sync call to the blobstore url to post our image result = urlfetch.fetch(url=upload_url, payload=request.FILES, method=urlfetch.POST, headers={

getting blobstore to callback to endpoint method

∥☆過路亽.° 提交于 2019-12-09 06:58:35
问题 I am developing an app-engine connected android project using the eclipse plugin. When I upload an image to the blobstore, how do I make it callback an endpoint method? I find great posts here that can be used as reference to understand my question better (if you need to). using blobstore with google cloud endpoint and android Saving blobs with Google Endpoint So really, I want to know how to make the callback url an endpoint method such as saveAnimalData below (I stole from referenced link)

Android Interaction with Google App Engine Blobstore Service

折月煮酒 提交于 2019-12-09 06:52:33
问题 I have currently set up the client side of my Android application (working on it for a couple of months new to Android). The functionality on the client side is to allow the user to click a photo and attach some textual information to it. Once the user has clicked the photo followed by adding text information, he/she clicks on "Done". This information needs to be sent to the Server. For my project it is a pre requisite to use Google App Engine. So the best possible way forward that I

Write files to the Blobstore

不羁岁月 提交于 2019-12-08 06:46:19
问题 Objective: Suppose the client submits a string or text file to the server (Google App Engine) using a web form. I want the server to modify the original file and serve it back to the client. I think the only way to serve files from GAE is using the Blobstore, right? Then, as we cannot modify blobs, I believe a solution would be: Client uploads a file using HttpRequest Server reads the uploaded file and copies it to a temp buffer (not sure if is there a method to do this) Server deletes

Best way to link datastore entity to its blobstore image?

╄→гoц情女王★ 提交于 2019-12-08 05:48:44
问题 Let's say I have a model for my email address book: class contact(db.Model): email = db.EmailProperty() image = #Hmm. My contacts' images will be stored in the Blobstore, and served at various sizes. So, should I use a db.ReferenceProperty(BlobInfo) such that I can serve it by doing: get_serving_url(alice.image.key, size=x) Or should I use a db.StringProperty so that I don't have to make the second read in order to get the key: get_serving_url(alice.image, size=x) Or should I use a db

How to upload and stream video using Appengine Blobstore

一笑奈何 提交于 2019-12-08 05:33:48
问题 I'm using Google Appengine to upload and serve photo images, but I would also like to do the same with audio and video files. Does anyone know any way to do this? Please let me have sample code if you can. Thanks. 回答1: The blobstore is suitable for any kind of file. It has no special affinity for images. The same upload and download handlers you use for images can be used for audio, video, or any other type of file. Streaming a video to a user has more to do with what kind of file you upload,