blobstore

Upload an image to google app engine blobstore with java programmatically

送分小仙女□ 提交于 2019-11-29 05:20:07
I have already watched "Writing Files to the Blobstore (Experimental)" in the google app engine page. This is what I have : // Get a file service FileService fileService = FileServiceFactory.getFileService(); // Create a new Blob file with mime-type "text/plain" AppEngineFile file = fileService.createNewBlobFile("text/plain"); // Open a channel to write to it boolean lock = false; FileWriteChannel writeChannel = fileService.openWriteChannel(file, lock); // Different standard Java ways of writing to the channel // are possible. Here we use a PrintWriter: **PrintWriter** out = new PrintWriter

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

我与影子孤独终老i 提交于 2019-11-29 04:52:46
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. 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 this: blobs = BlobInfo.all().fetch(500) for blob in blobs: if not MyModel.all().filter("blob_ref =", blob

AFHTTPRequestOperationManager post multi-part request not working

被刻印的时光 ゝ 提交于 2019-11-28 10:32:44
问题 Here is the template that I am using from the Git Doc AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSDictionary *parameters = @{@"foo": @"bar"}; [manager POST:@"http://example.com/resources.json" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"JSON: %@", responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"Error: %@", error); }]; Here is how I am using it -(void

How to serve Google Cloud Storage images?

懵懂的女人 提交于 2019-11-28 09:04:55
问题 I want google.appengine.ext.blobstore and google.appengine.api.images to work outside of App Engine. Do these modules require App Engine in order to work? I want to create public but not guessable URLs of my images on Google Cloud Storage and serve them via Django. I read that this is done with google.appengine.ext.blobstore.create_gs_key() and google.appengine.api.images.get_serving_url() . This is what I have so far: from google.appengine.api import images from google.appengine.ext import

Store image to Blobstore from android client and retrieve blobkey and upload url to store in Datastore. - GAE

◇◆丶佛笑我妖孽 提交于 2019-11-28 08:31:54
In my Android application, I want to upload image to the Blobstore, then retrieve an Upload url and the image's Blobkey, so I can store the Blobkey in the DataStore. I've tried this code, but my image isn't uploading: Servlet (Return upload url) BlobstoreService blobstoreService = BlobstoreServiceFactory .getBlobstoreService(); public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { UploadOptions uploadOptions = UploadOptions.Builder .withGoogleStorageBucketName("photobucket11") .maxUploadSizeBytes(1048576); String blobUploadUrl = blobstoreService

Uploading Files in webapp2/GAE

余生长醉 提交于 2019-11-28 05:08:56
问题 I need to upload and process a CSV file from a form in a Google App Engine application based on Webapp2 (Python) I understand I could use blobstore to temporary store the file but I am curious to know if there is a way to process the file without having to store it at all. 回答1: The content of uploaded files is in self.request.POST in your handler, so you can get that content (assuming e.g the field for the uploaded file is named 'foo' ) with e.g content = self.request.POST.multi['foo'].file

Upload to Appengine Blobstore in Android

别说谁变了你拦得住时间么 提交于 2019-11-28 01:03:35
问题 I'm working on a simple multimedia messaging app for Android, and I was trying to use Google AppEngine's BlobStore as my cloud storage for the various image, video, and audio files that will be transferred. However, all of the examples and such that I've seen for uploading to blobstore assume that I'm doing it via an HTTP form, and so I'm kind of at a loss as to what to do. I've seen several people asking the same question, but none of them seem to ever get a satisfactory answer. Can I or

Upload an image to google app engine blobstore with java programmatically

。_饼干妹妹 提交于 2019-11-27 23:03:39
问题 I have already watched "Writing Files to the Blobstore (Experimental)" in the google app engine page. This is what I have : // Get a file service FileService fileService = FileServiceFactory.getFileService(); // Create a new Blob file with mime-type "text/plain" AppEngineFile file = fileService.createNewBlobFile("text/plain"); // Open a channel to write to it boolean lock = false; FileWriteChannel writeChannel = fileService.openWriteChannel(file, lock); // Different standard Java ways of

Google Blobstore versus Google Cloud Storage [closed]

走远了吗. 提交于 2019-11-27 18:27:52
We have our application hosted on Google app engine for Java and we have a requirement where we want to store the blood donor appreciation certificates ( html files) somewhere. So, we can use either Google Blobstore or Google Cloud Storage. I know both of these solutions are feasible to do using gae for Java However, the problem for us is to decide which one to use. What are the pros and cons of these two approaches? We are a non profit and cannot pay a lot. Svetlin Nakov Better to use the Blobstore. The service has 5 GB of space for free (as of March 2012). The cloud storage is a paid service

using blobstore with google cloud endpoint and android

*爱你&永不变心* 提交于 2019-11-27 17:13:21
I am developing an app-engine connected android project using the eclipse plugin. One aspect of the app is to allow user Alpha to send pictures to user Bravo. To do that I have the following setup: User Alpha posting: send image to my app engine server through endpoints server stores image in blob store server stores blobkey in datastore User Bravo getting: server gets blobkey from datastore server gets image using blob key server sends image to android app using endpoints This setup takes upward of two (2) minutes from when my android app sends an image to when I can see it in the blob sore.