how to create an endpoint api for image uploading with python

40 views
Skip to first unread message

bharat soni

unread,
Oct 24, 2016, 9:32:41 AM10/24/16
to Google App Engine
hello all,
    i want an specific solution that how can i create an google cloud endpoint api for image uploading with python for ios client i search lots of things on google but not get any required solution please provide me a specific solution of creating an api with python with google cloud endpoint thanks.

Nicholas (Google Cloud Support)

unread,
Nov 29, 2016, 10:22:29 AM11/29/16
to Google App Engine
If I understand your request correctly, you are looking to upload an image from an iOS device to the cloud using Google Cloud Endpoints.

As far as I'm aware, Google Cloud Endpoints does not accept multipart/form-data encoding uploads so you would not be able to use such endpoints directly for uploading images or any file for that matter.  The solution requiring the least amount of effort would be a small App Engine service that accepts uploads and processes them before saving to Google Cloud Storage.  An example can be found in Reading and Writing to Google Cloud Storage.

Depending on your application requirements and authentication requirements, you may also want to consider using Cloud Storage's JSON API directly from your iOS application.  With the solution and uploading images (usually within 10MB), I would use a multipart upload for sending everything with a single request.  An example of the core network requests required can be seen in Performing a Multipart Upload.  Since there's currently no client library specifically for Cloud Storage with iOS, you'd need to either use the generic Client Library for Objective-C REST or handle API authentication yourself.

Hope this is helpful.
Reply all
Reply to author
Forward
0 new messages