Upload File with webservice
-
11 April 2008 5:59I want to upload a file to sharepoint without using the API or a custom webservice. I have tried to use Copy.CopyIntoItems() to upload files, but when the destination is in the "Meeting Workspace", it's failed and I got the error "The destination is in a Meeting Workspace, which does not support this action."
I know I can user HTTP PUT to do that, but is there any other method to upload files to any specified document library with sharepoint webservice?
Semua Balasan
-
10 Mei 2012 16:38Did you ever figure this out? If not, do you have an example of how to use HTTP PUT? Thank you.
Lindsay L. Dreyer
-
10 Juli 2012 2:21
Hi,
Did you figure out this problem. I am also not able to upload documents to meeting workspace site in SharePoint 2010.
-
10 Juli 2012 5:37
Refer to the following post
--Cheers
-
10 Juli 2012 13:19Hi Prasath,
Thanks for your quick response.
I am having the same code, and it is working for all sites except meeting workspace type of site.
In a meeting workspace site, when you create a meeting, it will generate the new instance id folder within all libraries. I am also including that folder in my destination URL parameter of CopyIntoItems() method.
for e.g.
http://sitecollection/teamsite/meetingworkspacesite/1/documentlibrary/filename.pdf
Correct me, if I am wrong.Thanks, Rinkal
-
10 Juli 2012 16:14
If web service does not work, you can try uploading using WebDav Protocol. The webclient class will definitely work.
WebClient oWebClient = new WebClient();
oWebClient.UseDefaultCredentials = true;
byte[] bFile = System.IO.File.ReadAllBytes(@"C:\Test\WEB315.wmv");
string ulr = @"http://lt010593/Shared Documents/WEB315.wmv"; System.Uri oUri = new System.Uri(ulr); oWebClient.UploadDataAsync(oUri, "PUT", bFile); oWebClient.UploadDataCompleted += new UploadDataCompletedEventHandler(oWebClient_UploadDataCompleted);
Sundar Narasiman