Endpoints Proto Datastore API を使用しています。次のようなコードがあるとします。
モデル :
class MyModel(EndpointsModel):
_message_fields_schema = ('name', 'image')
name = ndb.StringProperty()
image = ndb.BlobProperty()
API :
@endpoints.api(name='myapi', version='v1', description='my api')
class MyApi(remote.Service):
@MyModel.method(name='mymodel.insert', path='mymodel')
def insert_mymodel(self, data):
data.put()
return data
API を介してデータストアに画像をアップロードするにはどうすればよいですか? 前もって感謝します。