One simple approach to this would be to attach the picture as an attachment directly to your comment. So the node could have a binary attachment called "default" which is a picture that was uploaded. This is a really simple approach for a situation where you know you'll have 1 image per node.
More complex scenarios would be ones where you have a separate node per picture and then associate nodes together. If you look at the Sample Project, it uses this pattern. This facilitates re-use of images and so forth. The Alpaca forms engine provides controls to let these associations auto-create behind the scenes.
A good starting point is just to have 1 image on the comment node. Once you get that working, you can move on to other structures as you wish.
Simply set up a <form> on the screen with a <input type='file'> element and have the form POST to the Cloud CMS API using a URL like this:
You can post either a form-encoded or multi-part upload and Cloud CMS will sort things out for you.
Your post should include the content type. You might wonder how to figure out the content type and that's a good question. It turns out to be a rather challenging domain of problem - but most form libraries (including Alpaca, FileUpload and others) infer it from the filename. This sort of works. Cloud CMS provides more support here in that if you send application/octet-stream (which is what most browsers send when they don't otherwise know what to send), Cloud CMS will guess the mimetype for you based on the filename.
Once you have the attachment uploaded, you will be able to retrieve it using a GET to the same URL. If you wanted to upload multiple attachments to your node, you can change "default" to other values. Such as "image" or "photo" or anything else you'd like.
The other interesting challenge which sometimes comes up with direct HTML5 -> Cloud CMS API applications is that of authentication. The form POST needs to pass the GITANA_TICKET cookie along with it which acts as a way to validate the access token and identify the user.
provides some really great value if you have complex form goals, such as side-by-side data entry with upload or multi-page needs (wizards, etc).