1

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

1 Answer 1

1

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.