Page 1 of 1

Drag and Upload file into Document Set from Form

Posted: 18 Mar 2019
by Adam Reyes
Hello, I have a form and when a new item (Project) is created a workflow starts and creates a Document Set with the same name of that new item. On that form I would like users to be able to drop documents into that related library. The issue I'm having is that I would like the files to be dropped into the Document Set folder instead of the root of the library so there are no conflicting file overwrites. Is there a function in javascript that can drop the files into the Document Set once it's been dragged onto the form?

Re: Drag and Upload file into Document Set from Form

Posted: 21 Mar 2019
by AlexZver
Dear Adam,

I'm sorry for a late reply. Please consider using the fd.updateDroppedDocuments() function: https://spform.com/javascript-framework ... ctionality

To upload the file in the certain folder you can just add the folder name in the path:

Code: Select all

var newFileName = listItem.get_item('FileDirRef') + '/folderName/' + newName;