I would like to upload a file into share point using FORM POST. I am trying in this way
<FORM NAME="oForm" id="oForm" ACTION="<site>/_layouts/Upload.aspx?List={A4793E2B-3081-4668-B6F1-0A013159F9B1}&RootFolder=/sites/servdeldocmgr/Test SOAP2" ENCTYPE="multipart/form-data" METHOD="POST">
<input type="file" name="file开发者_JAVA技巧1" id="file1" />
</FORM>
In onclick of a button I am doing form post. But It's not uploading. I found .net based solutions but my case is only with javascript and html.
The best is to rely on SharePoint API, populate the item (e.g SPList) and upload the file. I will provide some sample code later as I can't recall the exact function.
EDIT:
http://msdn.microsoft.com/en-us/library/dd587349(office.11).aspx has some good code snippets to get you started.
I am able to add attachment to list item. I put my experience here. Instead of uploading to upload.aspx, I achieved differently. I am able to achieve without .net, I found many .net solutions but again it will be one more programming language in application stack so I didn't use it.
http://myveda-yvb.blogspot.com/2010/01/my-learnings-sharepoint-web-services.html
精彩评论