blobstore

Google App Engine - ImagesService.getServingUrl() fails to read image

青春壹個敷衍的年華 提交于 2020-01-06 08:13:26
问题 I'm receiving an image file through a HTTP request and storing it in the Blobstore. My code is along the lines of that found here: [https://developers.google.com/appengine/docs/java/blobstore/overview#Writing_Files_to_the_Blobstore][1]. When calling the function ImagesService.getServingUrl() on the blobkey for the image I had stored I get the message below: HTTP ERROR 500 Problem accessing /upload. Reason: Failed to read image Caused by: java.lang.IllegalArgumentException: Failed to read

Google App Engine - ImagesService.getServingUrl() fails to read image

淺唱寂寞╮ 提交于 2020-01-06 08:12:09
问题 I'm receiving an image file through a HTTP request and storing it in the Blobstore. My code is along the lines of that found here: [https://developers.google.com/appengine/docs/java/blobstore/overview#Writing_Files_to_the_Blobstore][1]. When calling the function ImagesService.getServingUrl() on the blobkey for the image I had stored I get the message below: HTTP ERROR 500 Problem accessing /upload. Reason: Failed to read image Caused by: java.lang.IllegalArgumentException: Failed to read

Is it possible to store arbitrary data in GAE Golang Blobstore?

烈酒焚心 提交于 2020-01-03 19:37:39
问题 I am creating a large database application in Google App Engine Go. Most of my pieces of data are small, so I have no problem storing them in Datastore. However, I know I will run into a few entries that will be a few megabytes big, so I will have to use Blobstore to save them. Looking at the reference for Blobstore, it appears that the service was mainly intended to be used for files being uploaded to the service. What are the functions I need to call to store arbitrary data in the Blobstore

BlobInfo object from a BlobKey created using blobstore.create_gs_key

空扰寡人 提交于 2020-01-02 06:12:20
问题 I am converting code away from the deprecated files api. I have the following code that works fine in the SDK server but fails in production. Is what I am doing even correct? If yes what could be wrong, any ideas how to troubleshoot it? # Code earlier writes the file bs_file_name. This works fine because I can see the file # in the Cloud Console. bk = blobstore.create_gs_key( "/gs" + bs_file_name) assert(bk) if not isinstance(bk,blobstore.BlobKey): bk = blobstore.BlobKey(bk) assert isinstance

How do I save web images to App Engine's blobstore?

扶醉桌前 提交于 2020-01-01 19:16:38
问题 I've used this question as a template to solve the same problem, but I'm running into issues when posting. I have these components: HTML form with a textbox for the image URL. This posts to... A handler that takes the posted URL, encodes it, and uses urlfetch to post it again to... A separate file upload handler that does the actual saving. Component #3 works fine by itself if I use a file input. But I don't quite understand how to get urlfetch what it needs from just the image URL. My

Uploading a video to google app engine blobstore

最后都变了- 提交于 2020-01-01 06:26:13
问题 I'm trying to associate a video file to a record with a bunch of properties, but can't seem to allow the user to do everything in one form - name the video, provide description and answer some question, AND upload the file. Here are the steps I'd like to perform: User is served with a page containing a form with the following fields: Name, Description, File selector. The file gets stored as a blob and the id gets recorded together with name and description. Does anyone have any examples of

Multiple file upload using GWT and AppEngine Blobstore?

ε祈祈猫儿з 提交于 2020-01-01 03:25:10
问题 How would I go about creating a modern, Gmail-like, multiple file upload in GWT and AppEngine Blobstore? The solution most commonly proposed is gwtupload, an excellent GWT component written by Manolo Carrasco. However, the latest version 0.6.6 does not work with blobstore (at least I can't get it to work), and it does not support multiple file select. There's a patch for multiple file select in the latest 0.6.7 snapshot, but although it allows selection of multiple files (using the "multiple"

Google App Engine Use Blobkey

≯℡__Kan透↙ 提交于 2019-12-31 04:49:07
问题 Hi there i am trying to make a servlet that allows admins to upload images and any google users to view these images, so far im working off the program available at https://developers.google.com/appengine/docs/java/blobstore/overview and when i upload an image, it serves it straight away using a very long blobKey? and stores a copy of itself in the local_db.bin What i can't find out is if there is any way to shorten the blobkeys for use? For instance i want to have a gallery which displays

Using Google BlobStore with an Android application

℡╲_俬逩灬. 提交于 2019-12-29 09:29:19
问题 I found 1 thread about this question, which did partially answer the question, but I'm afraid I may need some details. I'm currently trying to use BlobStore with my android app, and I can't get anything else than a 501 error (the HTTP server can not handle your request). He is my code ; HttpPost httpPostImg = new HttpPost(url); Header header = new BasicHeader("Content-Type", "multipart/form-data"); Header h = new BasicHeader("Connection", "keep-alive"); MultipartEntity entity = new

Is it possible to find and delete orphaned blobs in the app engine blobstore?

余生长醉 提交于 2019-12-29 06:26:08
问题 I'm using the python api and have created a few orphaned blobs during testing. Because of a bug in the dashboard, I can't currently delete these, and in any case going forward I would like to be able to do this programmatically since it will be unfeasible to do it manually once the number of entities goes up. 回答1: If your BlobReferenceProperty field is indexed, then yes, it's quite possible. The BlobInfo class provides the same set of fields as a regular model, so you can do it something like