Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

i have seen several SOM examples online for programmatically creating a document set, but I would need to accomplish this with javascript/jquery if possible. Is this possible, and if so how is it done (reference)?

Thanks very much for any assistance

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I don't think you can do that directly.
What you can do is to use the /_layouts/Upload.aspx page and use an ajax file uploader.

What I would do:

  1. Use an third part ajax file uploaded such as valums / file-uploader.
  2. Find the ID of your library (list).

    var title = 'D';
    var ctx = new SP.ClientContext();
    var list = ctx.get_web().get_lists().getByTitle(title);
    ctx.load(list);
    ctx.executeQueryAsync(function() {
      var id = list.get_id().toString();
      // Use id here
    });
    
  3. Use the found ID to tell where to post your files, something like

    /_layouts/Upload.aspx?List={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
    

And take it from there, if you open that url and include &IsDlg=1 it should be possible to see how it accepts data.

share|improve this answer
    
thanks man. appreciate it –  Justin Oct 1 '12 at 16:26
add comment

Your Answer

 
discard

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.