I have been tasked with moving a Ning community of 17500 users to Discourse. I have gotten the user adding part working using a modified version of the Discourse API for PHP from here
I plan to parse in the full 17500 users and then work on them one at a time, looping through with a
The sticking point is that there isn’t a clear example of how to upload each user’s avatar (present on my local disk) to the API using the
uploads.json endpoint. I see how it can be done if the file is uploaded through a standard browser upload, but the mechanism of using a file loaded from disk programmatically in PHP instead of a browser upload is eluding me.
If anyone can offer any advice on this issue I would appreciate your help enormously. Thanks!