Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active August 29, 2015 14:21
Show Gist options
  • Select an option

  • Save githubutilities/54f31d3f0ceb2c559094 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/54f31d3f0ceb2c559094 to your computer and use it in GitHub Desktop.
Media Upload API Design

Media Upload API Design

  • http
  • Content-Type(such as application/json or application/x-www-form-urlencoded) does not mater as long as the key-value things is correct
  • multipart post to reduce overhead and upload multiple images in one http request, here is more detail about multipart form data on stackoverflow.
  • base64 encoding or raw binary

HTTP Keep-Alive Connection

HTTP uses keep-alive connection to achieve multiple requests over single TCP connection resource. For more explaination, please refer to this.

Providing image with different size

http://localhost/image123.jpg?size=640 as in web_uploader of picasa

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment