Quick response
You can store binary data of any type of file using db.BlobProperty() in your model.
If you use the Image API to manage image data, you are limited to entering the types .jpg , .png , .gif , .bmp , .tiff and .ico and outputting to .jpg or .png .
Saving Images
To simply save images to the data warehouse, use db.BlobProperty() in your model and save this binary data for the image. This is how the data is stored in the code below (see Line 85 ).
Since the type of type db.BlobProperty is not in itself, but can store any binary data, some discipline is needed; There is no easy way for software to enforce restriction of images only. Fortunately, this means that you can store any type of data you want, including .jpg , .gif , .tiff , etc. Files in addition to the .png format, as in the example.
You will probably want, as in this example, to create a new class for the model and save the specific metadata ("name", "file type", etc.) necessary for the files, in addition to the binary image data. You can see an example of this on line 65 in the example you are attached to.
To save the image in BlobProperty , you want to use db.put() to save the data; it is the same as for any type. See Code starting with Line 215 for an example of the code you are attached to.
Image manipulation
If you need to manipulate the image, you can use the Images API package. From the Image API Overview, we can see the following:
The service accepts image data in the formats JPEG, PNG, GIF (including animated GIFs), BMP, TIFF and ICO.
It can return converted images in JPEG and PNG formats. If the input format and output format are different, the service converts the input data to the output format before performing the conversion.
Thus, although you can technically store any type in a data warehouse, the valid type of input and output is limited if you use this API to manage images.