blobstore

If you're storing an image Blob in App Engine, should you put it in the Blobstore or Google Cloud Storage?

一曲冷凌霜 提交于 2019-12-19 09:19:07
问题 Google Cloud Storage seems more cost effective than the App Engine Blobstore . At the moment I am storing user-uploaded image files as Blob type fields in the Datastore (App Engine Java API, by the way). But I'm debating whether to switch to either the Blobstore or Google Cloud Storage to permit image sizes greater than 1MB. Google Cloud Storage seems more cost-effective than Blobstore . Which one would be better for storing large images? 回答1: The Blobstore is tightly integrated with App

Using AFNetworking to post both text and multiple images to Google Blobstore

老子叫甜甜 提交于 2019-12-19 04:45:47
问题 For reference, here is the working android/Java version of what I am trying to do in iOS/Objective-c public static void saveTextsAndImagesOnServer(List<byte[]> images, long someID1, String servingUrl, boolean someFlag) throws ClientProtocolException, IOException { Log.d(TAG, "saveTextsAndImagesOnServer started "); HttpClient httpClient = new DefaultHttpClient(); HttpPost postRequest = new HttpPost(servingUrl); MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER

serving blobstore image through app-engine endpoints api

穿精又带淫゛_ 提交于 2019-12-18 12:37:07
问题 I am building an app-engine endpoint api that takes picture from a user (android app) and saves it to blobstore programmatically. Then I save the blob_key in my datastore. The code goes like this: First I received the image through my @endpoint.method as a messages.BytesField : image_data = messages.BytesField(1, required=True) Then I save to the blobstore like this: from google.appengine.api import files def save_image(data): # Create the file file_name = files.blobstore.create(mime_type=

Direct user upload to GCS with given name and parameters

纵饮孤独 提交于 2019-12-18 09:34:52
问题 I want to enable clients of my Python GAE app to upload files directly to GCS using a specific object name and GCS parameters I set up front (such as cache control and ACL), and perform some actions after the upload has finished. I currently use the blobstore.create_upload_url for this. However, since I cannot give any parameters or object name up front, I need to copy the entire file to a new location on GCS from within the 'uploaded' callback handler. This is time and (compute) resource

Storing rotated / flipped images in Google App Engine

徘徊边缘 提交于 2019-12-18 04:15:22
问题 I'm trying to rotate / flip an image that is already sitting inside Google Cloud Storage. This is the blobkey: BlobKey blobKey = new BlobKey(upload.getBlobKey()); Then I retrieve the image and apply an image transform: ImagesService imagesService = ImagesServiceFactory.getImagesService(); Image image = ImagesServiceFactory.makeImageFromBlob(blobKey); Transform transform = ImagesServiceFactory.makeRotate(90); Image newImage = imagesService.applyTransform(transform, image); The RAW image data I

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

瘦欲@ 提交于 2019-12-17 18:40:36
问题 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

Clear example of using Google App Engine Images get_serving_url()

回眸只為那壹抹淺笑 提交于 2019-12-13 19:01:12
问题 Anybody know of an example of this? I haven't been able to find one in Google's documentation. 回答1: get_serving_url is documented here. There's no end-to-end example per-se, but it's pretty straightforward: You pass it a blob key, along with optional resize and crop options, and it gives you back a URL. You can use that URL anywhere you want to reference the image, and it'll be served up by the infrastructure, resized and cropped appropriately. Note that this is only for images uploaded to

Send_blob in GAE

若如初见. 提交于 2019-12-13 07:07:01
问题 i created zip files into the blobstore in GAE,then i tried to get(download)this zip file using this code: def send_blob(blob_key_or_info, content_type=None, save_as=None): CONTENT_DISPOSITION_FORMAT = "attachment; filename=\"%s\"" if isinstance(blob_key_or_info, blobstore.BlobInfo): blob_key = blob_key_or_info.key() blob_info = blob_key_or_info else: blob_key = blob_key_or_info blob_info = None if blob_info: content_type = content_type or mime_type(blob_info.filename) save_as = save_as or

Uploading images to App Engine in Java using Jquery blueimp [closed]

烈酒焚心 提交于 2019-12-13 04:47:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Could someone point me to some resource to implement multiple image uploads to Java app engine blobstore using JQuery blueimp plugin? The docs have a maven implementation but I understand porting an existing project to Maven is tricky and I want avoid this step. Thanks 回答1: Hi I also kept struggling with this

Images in Watermark in Google App Engine (Java)

非 Y 不嫁゛ 提交于 2019-12-13 04:33:39
问题 How to use ImageService in AppEnginge to add watermark on images. Images are uploaded to blobstore then serve. Simple text watermark will do. Any reference on this? Thanks 回答1: You can do this using ImagesServiceFactory.makeComposite, which allows you to specify X and Y positions and an opacity for an image to composite onto a canvas (the base image). Simply include your watermark image as a resource your app can access using ImagesServiceFactory.makeImageFromFilename. 来源: https:/