SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create multiple file upload application(Client Object Modal) which upload the multiple document in the specific(selected) document library with the meta data(custom properties in library). is it possible to create application like this type of application ? if it is possible then how ?

share|improve this question
up vote 2 down vote accepted

Yes. I think you need to use an HTTP PUT to send the file to the server. Then, having sent it, you'll need to retrieve and set it's details using the client object model.

To upload a file, you can use something like:

WebRequest request = WebRequest.Create( "http://somedestination" + "/" + filename);
ICredentials creds;
//Set your credentials
request.Credentials = creds;
request.Method = "PUT";
byte[] buffer = new byte[1024];
using (Stream stream = request.GetRequestStream())
    using (FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read))
        for (int i = fs.Read(buffer, 0, buffer.Length); i > 0; i = fs.Read(buffer, 0, buffer.Length))
            stream.Write(buffer, 0, i);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.