All examples that I can find in google endpoint api (e.g. tic-tac-toe sample) show lines of strings, integers, enumerations, etc. None of the examples talk about how to specify files (for example, images or zip files) to upload or download using the API. It's impossible?
If possible, can someone share a code snippet on how to determine the google endpoint on the server to allow file upload and download? For example, is there a way to set HTTPResponse headers to indicate that the endpoint response will serve the zip file? How to include a zip file in response?
Nice to appreciate the example with python or php. If any of the end -s-proto-datastore team is watching this discussion, tell me if file downloads are supported at the endpoints right now. We do not want to waste our time trying to figure it out if this is simply not possible. Thank.
We are looking for a complete example to download and download. We need to save the key for the downloaded file in our database at boot time and get it for download. The client application sends a token that the API must use to find out which file to load. Therefore, we need to save the blob key generated during the boot process in our database. Our database will have a mapping between the token and the blob file key.
class BlobDataFile(models.Model):
data_code = models.CharField(max_length=10)
blob_key = models.CharField()
, Django 1.7 mysql (modeled with models.Model). , Google App Engine, , Webapp ( urls.py/views.py ). , , API. urls.py/views.py blob_key BlobDataFile, .