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.
<a class="ms-addnew" href="http://sharepoint.fm.rbsgrp.net/teams/spbmc10/_layouts/listform.aspx?PageType=6&ListId={f6f7ee9c-157f-4d79-9295-a7ca83688299}&ID=7" onclick="javascript:NewItem2(event, "http://sharepointsite/teams/blahblah/_layouts/listform.aspx?PageType=6&ListId={f6f7ee9c-478h-4d78-9123-a7ca12345678}&ID=7");javascript:return false;" target="_blank">Edit item</a>