blobstore

xml file doesn't update. What is the reason for this?

风流意气都作罢 提交于 2019-12-13 00:41:10
问题 There is a xml file in the blobstore which looks like : <?xml version="1.0" encoding="UTF-8"?> <Blobs> </Blobs> The following servlet uploads a file to the blobstore . After it uploads the file , it gets the file key and calls a Bean that updates the xml by adding a node whose text-content is the key. public class UploadImagesToAisle extends HttpServlet { /** * Handles the HTTP * <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws

BlobStore vs Cloud Storage for storing user uploaded images

风格不统一 提交于 2019-12-12 21:13:20
问题 I'm new to AppEngine and I'm building an app that accept user image uploads from Android devices. I built it with Cloud Storage but then I realized that I have problems uploading large files (maybe because of request time limits?) so I figured out I should use Blobstore's upload URL to properly upload multiple large files. Blobstore also has the on-the-fly image resizing feature which is very nice. the thing is, Cloud Storage is cheaper than the Blobstore. should I move the uploaded files

Uploading multiple images to GAE Blobstore using HTML5 multiple file input

蓝咒 提交于 2019-12-12 17:07:26
问题 I'm trying to store multiple image files to the GAE Blobstore using HTML5 multiple file input. Since my web application will be used by photographers to batch upload photos, it is absolutely critical to enable multiple file selection on the client's browser (uploading 200+ photos one at a time would be a pain) The client side HTML would look like this: <form action = "/upload" method="post" enctype="multipart/form-data"> <input type="file" name="myFiles[]" multiple="true"/> <input type=

GAE: testing download of blobs with testbed and webtest

 ̄綄美尐妖づ 提交于 2019-12-12 10:56:14
问题 I'm using the blobstore with my Google App Engine app, and everything is working fine on the production server and the development server. Testing with testbed and webtest, however, isn't working... In my tests, the blob exists as I can access it like this: blob = self.blobstore_stub.storage._blobs[key] When I try to download a blob in my tests like this response = self.app.get("/blob-download/2") my blobstore download handler never gets called and I get a 404 error (but the link works on the

ndb.BlobProperty vs BlobStore: which is more private and more secure

℡╲_俬逩灬. 提交于 2019-12-12 08:39:31
问题 I have been reading all over stackoverflow concerning datastore vs blobstore for storing and retrieving image files. Everything is pointing towards blobstore except one: privacy and security. In the datastore, the photos of my users are private: I have full control on who gets a blob. In the blobstore, however, anyone who knows the url can conceivable access my users photos? Is that true? Here is a quote that is supposed to give me peace of mind, but it's still not clear. So anyone with the

GAE Blobstore issue - download fails in internet explorer 8

时光总嘲笑我的痴心妄想 提交于 2019-12-12 06:28:44
问题 I have an issue with serving files to internet explorer using send_blob function. Files are quite small from 0.5Mb to 5Mb. All works fine in Firefox and Chrome, but in IE 8.0 I get download progress window and after couple of seconds error: "Unable to download [blob key here] from [domain name here] Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later" 回答1: This issue is caused by a bug in IE when trying to download binary

UnicodeDecodeError. While rendering the blob image

自作多情 提交于 2019-12-12 00:32:43
问题 I am trying to add uploading images feature. This class saves new entity: class NewPost(Handler): def render_newpost(self, title='' , content='', error = ''): self.render("newpost.html", title = title, content = content, error = error) def get(self): user_cookie = self.request.cookies.get('user') if user_cookie: user_id = user_cookie.split('|')[0] if hash_str(user_id) == user_cookie.split('|')[1]: user = Users.get_by_id(int(user_id)) self.render_newpost() else: self.redirect('/') def post

GWT GAE Upload through Blob

ぐ巨炮叔叔 提交于 2019-12-11 18:13:41
问题 If I'm using GWT File widget and form panel, can someone explain how to handle upload on blobstore on google application engine?? 回答1: Take a look at gwtupload. There are examples on how to use it with GAE Blobstore. 回答2: Google blobstore is specifically designed to upload and serve blobs via http. Blobstore service (obtained using BlobstoreServiceFactory.getBlobstoreService() ) generates http post action for you to use in the html form. By posting file to it you upload your blob to the

storing static images in the blobstore

主宰稳场 提交于 2019-12-11 17:57:56
问题 Normally to host a website on app-engine, I can put all my image files in a static directory, say img , and then in the yaml file have url: /img static_dir: img Such a usage makes sense when the images are for displaying in my website itself. But now I have an endpoint api. For my case, I need to store some images in my backend for my users to access. Instead of putting them in static directory, I want to put them in the blobstore and use blob serving url to serve them. Is there a way to

How to retrieve a byte array from the blobstore?

℡╲_俬逩灬. 提交于 2019-12-11 10:53:11
问题 I read the docs, googled around, but still cannot figure how to read a blob as a byte array. I'm able to generate PDF files and store them in the blobstore. I can also serve these blobs for download using serve(), no problems. All this is working fine. Now I want to retrieve one of these blobs, and read it as a byte array to pass it to the Mail API, for sending as Mime attachment. The Mail API accepts only byte arrays as attachment data, as I understood. I saw the read() method of the