as stated in that post you refer there is REST api for that, it is just refer to form resource (which is kind of misleading) but it accepts regular HTTP POST calls. Just make sure that whenever you send your requests to that URL you send it with enctype="multipart/form-data"
HTH