Upload avatar image with API

It is, but it’s a very different API.
Here’s the client code:

It’s possible to implement it in a PHP script for sure. I think I’ve either seen it done or done it myself before (don’t remember which).

Goes something like this:

  • start a new thread that posts to the message bus to register
  • back in main thread, once that kicks off, start the upload
  • 2nd thread loops until it gets the upload id, passes ID back to main thread, exits
  • main thread waits to get the ID from the bus thread (could be a thread.join())