Could someone tell me how to use blobstore with endpoints? Any tutorial sites/videos would be superb.

50 views
Skip to first unread message

Deepesh Mathuria

unread,
Feb 25, 2016, 6:16:16 AM2/25/16
to Google App Engine
I am creating a web application which allows user to post text content along with file uploads. I've built my entire webapp on cloud endpoints, but I'm having problem with the file upload part integration. I know it can be done with blobstore but I want to know how - I've not had any experience working with blobstore.

Jeff Schnitzer

unread,
Feb 25, 2016, 11:53:15 AM2/25/16
to Google App Engine
Nevermind the blobstore. The old Blobstore is deprecated (does it even exist anymore?) and the Blobstore API was really designed around submitting data to this service. Google adapted it to Google Cloud Storage but you’re much better off just using the GCS API directly.

Jeff

On Thu, Feb 25, 2016 at 3:16 AM, Deepesh Mathuria <deepesh...@gmail.com> wrote:
I am creating a web application which allows user to post text content along with file uploads. I've built my entire webapp on cloud endpoints, but I'm having problem with the file upload part integration. I know it can be done with blobstore but I want to know how - I've not had any experience working with blobstore.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/bd4d37c8-758f-4ad7-992e-99356f2e9581%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicholas (Google Cloud Support)

unread,
Feb 25, 2016, 1:41:43 PM2/25/16
to Google App Engine
I would agree with Jeff and strongly advise using Google Cloud Storage. There is a client library to use it from each of the runtimes and also has a HTTP REST API usable by any front-end you would authenticate. Here's the Getting Started guide for the Java client library which demonstrates basic object reading and writing.

It's difficult to provide more specific guidance than the above without knowing a little more about how you intend to use this exactly. I hope this helps.

Deepesh Mathuria

unread,
Feb 25, 2016, 6:09:45 PM2/25/16
to Google App Engine
Okay so you are suggesting to use cloud bucket, could you tell me the advantages it will have over blobstore. And also could you tell me if Images API work is compatible with cloud storage bucket.

Jeff Schnitzer

unread,
Feb 26, 2016, 12:19:56 PM2/26/16
to Google App Engine
Separate in your mind the Blobstore (place were data can be put) and the Blobstore API (which is a programming API builtin to the GAE service layer and can be used with GCS).

The Blobstore is a nonstarter. It is deprectated. It will go away.

The question you want to ask is: What is the best way to put files in GCS?

My team just finished moving our code from using the Blobstore API to directly using the GCS API. The Blobstore API is annoying in that the (java) development server always stores submitted files in a local fake blobstore implementation, not GCS. There’s no simple way to get a direct link to the local file in the blobstore except via the images api, which only works on images of certain types. And the design is somewhat poor - if an error occurs during the blobstore api callback (say, a datastore timeout), you can ‘leak’ blobs.

The docs for the GCS API are so-so (especially the construction of signed upload urls) but at the end of the day the system is much simpler, more robust, and there’s no conditional logic that differs running dev server vs production GAE.

Yes, you can use the image service with GCS. We stopped doing so and now use imgix.com. There are plusses and minuses to each.

Jeff


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
Reply all
Reply to author
Forward
0 new messages