Objective

It allows to upload a new document into an existing folder.DST must be provided.

Parameters

ParameterDescriptionType
folderNumberDocument number of the destination folder.Integer
pathPath of the document to upload (the Web Service account must have access to the path where the document is saved so to upload documents, first separately upload the content to that location and then use this method to upload the document from there to the DM library). The “Network Service” group must have “Read and Execution” permissions on the server folder where the document is stored.String
formThe name of the form used to create new folders.String
libraryeDOCS libraryString
userUser nameString
passwordUser passwordString
propProfileStringDocument properties.String
propFolderItemStringThis optional parameter allows to include values for the fields of the table “FOLDER_ITEM”, such as “DISPLAYNAME”, “ISFIRST”, “NEXT”, etc. These values will be used by default:

“NODE_TYPE”: “D”

“PARENT”: The “folderNumber” parameter of the method.

“PARENT_LIBRARY”: “0”

“REMOTE_SYSTEM_ID”: “0”

“ISFIRST”: “N”

“NEXT”: “0”

“LIBRARY”: “0”

“DOCNUMBER”: docNumber of the new document. Value generated by DM.

“VERSION_TYPE”: “R”

“VERSION”: “0”

“PARENT_VERSION”: Version System Id of the folder. Retrieved by the system.

“DISPLAYNAME”: property “DOCNAME” passed in the parameter “propProfileString”.

“HAS_PROPS”: “”

“READONLY_DATE”: “1753-01-01 00:00:00”

“PREV_VERSION_TYPE”: “”

“STATUS”: “0”

“FOLDERDOCNO_RO”: “0”

“FOLDERREMLIB_RO”: “0”

String
uploadUserThe user who uploads the document in the folder. This parameter is optional and can be used to test if the user has permission to edit the content of the folder. If the user doesn’t have permissions, the action is canceled. If no value is passed for this parameter then the value of the “user” parameter is used instead.String
clientOptional parameter for the client codeString
projectOptional parameter for the project codeString

Note:

  • To specify the extension of a document, it is necessary to include the FILE_EXTENSION tag into the properties parameter.
    For instance, <FILE_EXTENSION>docx</FILE_EXTENSION>

Rest Invoke

  • http://localhost:port/GSService/xml/ or http://localhost:port/GSService/json/
  • UriTemplate:
    • “/UploadDocumentToFolder/?folderNumber={folderNumber}&path={path}&form={form}&library={library}&user={user}&password={password}&propProfileString={propProfileString}&propFolderItemString={propFolderItemString}&uploadUser={uploadUser}&client={client}&project={project}”
    • “/UploadDocumentToFolderDST/?folderNumber={folderNumber}&path={path}&form={form}&library={library}&user={user}&dst={dst}&propProfileString={propProfileString}&propFolderItemString={propFolderItemString}&uploadUser={uploadUser}&client={client}&project={project}”

Example

http://localhost:8732/GSService/xml/UploadDocumentToFolder/folderNumber=748&path=C:\Users\Admin\Documents\SolutionSchema.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&password=owc123&propProfileString=SolutionSchemaadminDEFAULTDEFAULTDEFAULTadminSolutionSchemaACROBAT

Note: New documents are created without security. The ChangeSecurityAdvanced method can be used to modify the security, and the GetTrustees method to obtain the parent security, if needed. The GetFolderItem method may be useful to check the children’s current order in the folder. Then it is possible to use “ISFIRST” and “NEXT” through the propFolderItemString parameter of the method to properly include new children in the folder. For instance, it is possible to use the string “ISFIRST,Y;NEXT,0” to upload the first child of a folder. The method does control these properties to prevent the misuse of this property. For example, if the value ISFIRST = “N” is used when no children already exist in the folder, then the method will ignore the value and will use “ISFIRST,Y;NEXT,0” instead.

DST Example

http://localhost:8732/GSService/xml/UploadDocumentToFolderDST/?folderNumber=748&path=C:\Users\Admin\Documents\SolutionSchema.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&propProfileString=SolutionSchemaUTHOR_ID>adminUTHOR_ID>DEFAULTDEFAULTDEFAULTadminTYPIST_ID>SolutionSchemaACROBAT