Book Image

Python for Google App Engine

By : Massimiliano Pippi
Book Image

Python for Google App Engine

By: Massimiliano Pippi

Overview of this book

Table of Contents (15 chapters)
Python for Google App Engine
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Uploading files to Google Cloud Storage


It's extremely common for a web application to deal with image files or PDF documents, and Notes is not an exception. It could be very useful for users to attach an image or a document to one or more notes in addition to the title and the description text.

Storing big chunks of binary data in the Datastore would be inefficient and rather expensive, so we need to use a different, dedicated system: Google Cloud Storage. Cloud Storage lets us store large files in locations called buckets. An application can read and write from multiple buckets and we can set up an Access Control List (ACL) to determine who can access a certain bucket and with what permissions. Every App Engine application has its default bucket associated but we can create, manage, and browse any number of them through the Developer Console.

Installing Cloud Storage Client Library

To better interact with Cloud Storage, we need an external piece of software that is not included in the App...