David T.
David T.

Reputation: 23429

How to store files using google app engine and be able to view it?

I need a way to store files that can be viewable via a browser. currently i have an Android and iOS app that can query into my google app engine instance. I need to upload a few small files from the clients (android/ios) into app engine. I was looking at:

and i'm not sure what's the best option. the idea is that once i store the file, i can generate a publicly accessible link to view the file (i.e. an image, or a text) if they open the link on their browser. what's the best way to do so?

P.S. I've read that blobstore seems to be free under 5GB, whereas the cloud storage will charge you even for the first GB that you use? is this true still?

Upvotes: 0

Views: 389

Answers (2)

Gwyn Howell
Gwyn Howell

Reputation: 5424

Since your app is hosted on GAE, it makes sense to keep things on Googles infrastructure, so disregard S3 right off.

That leaves you a choice between bs and gcs, and the decision really comes down to what you need from your app. Blobstore is a feature of App Engine, whereas GCS is a standalone object store. Blobstore is the simplest and quickest solution to implement given your app is already running on GAE. But GCS will give you much more flexibility and is much richer with loads of features (security, caching, APIs etc). If you use blobstore, all traffic will go through App Engine, increasing your incoming/outgoing bandwidth quota. On the other hand, GCS has it's own quotas. As you mention, you also need to enable billing to use GCS, and there will be a charge for it's use.

So it's a toss up depending on what you need - how big your app is, how many users you have, how much data you need to store etc etc etc. The 'better' solution is cloud storage, but if you just need to store a few small blobs here and there, blobstore might be the right solution for you. Personally, I'd go for GCS as it gives you more options and flexibility going forward.

Sidenote: I have read/heard on several occasions that blobstore is being deprecated, and will eventually be replaced entirely by Cloud Storage.

Upvotes: 3

IanGSY
IanGSY

Reputation: 3714

This page and this page show the quota limits: 5GB of Cloud Storage (in your apps Default GCS Bucket), 5 GB in the Blobstore and 1 Datastore.

I would use Cloud Storage, once stored you can get a public url for the file.

Upvotes: 2

Related Questions