hangups icon indicating copy to clipboard operation
hangups copied to clipboard

Better image upload

Open avaidyam opened this issue 8 years ago • 0 comments

We should probably support the correct image upload method -- use a temporary album and follow the Google Photos "high quality vs. original" preference. It's just adding a few more fields:

{
  "protocolVersion": "0.8",
  "createSessionRequest": {
    "fields": [
      {
        "external": {
          "name": "file",
          "filename": "<FILENAME>",
          "put": {},
          "size": <FILESIZE>
        }
      },
      {
        "inlined": {
          "name": "use_upload_size_pref",
          "content": "true",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "album_mode",
          "content": "temporary",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "title",
          "content": "<FILENAME>",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "addtime",
          "content": "<TIMESTAMP (MSEC)>",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "batchid",
          "content": "<TIMESTAMP (MSEC)>",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "album_name",
          "content": "<MONTH DAY, YEAR>",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "album_abs_position",
          "content": "0",
          "contentType": "text/plain"
        }
      },
      {
        "inlined": {
          "name": "client",
          "content": "hangouts",
          "contentType": "text/plain"
        }
      }
    ]
  }
}

avaidyam avatar Jun 19 '17 05:06 avaidyam