title: Google Cloud Endpoints Upload Image as BytesField - Error 400 Invalid bytes value
body: <p>I'm trying to create an endpoint method to upload an image. I'm sending the image as base64. My method looks like this:</p>
  
  <pre><code>@endpoints.method(endpoints.ResourceContainer(file=messages.BytesField(1,required=True),
                                                content_type=messages.StringField(2,required=True)),
                message_types.VoidMessage,
                name='upload.file',
                path='upload/file')
  def upload_file(self, request):        
      create_file('bucket_name',request.file,request.content_type)
      return message_types.VoidMessage()
  </code></pre>
  
  <p>This works fine in development. However when I deploy to production and try uploading an image I get the following error:</p>
  
  <p>Method: cloudStorageTest.upload.file
  Error Code: 400
  Reason: invalid
  Message: Invalid bytes value: ...</p>
  
  <p>I noticed that in production if I upload a very small text file it works but anything larger results in the above message. Thanks in advance.</p>