This may be a poorly formed question, but I'm fairly new to sharepoint. What I'm doing is creating a custom page (just basic HTML and JS), and using that page to call SPAPI and SPServices to input different fields, etc into a list. What I dont know how to do, is to upload an attachment. I've explored some of the SPServices and SPAPI methods, but I've failed to encode a binary file, which is the way that both of those libraries need the byte array.
So, I switched gears and I'm trying to steal actual SP code. Does anyone know where the method to upload files (as attachments to a list item) lives, or how I can call it?
the closests I have gotten is calling the code below, stealing it from doing a bit of digging. This brings the modal popup up, from where I can edit an item and add an attachment. Not what I want really, but it gets me to the attachment code in a backwards kind of way.
Any suggestions? working in SP 2010. No Access to custom server side code. IE 8.