Objective
It allows to upload a new document into the library.DST must be provided.
Parameters
Parameter | Description | Type |
path | Path of the document to upload (the WCF 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 |
form | The name of the form used to create new folders. | String |
library | eDOCS library | String |
user | User name | String |
password | User password | String |
properties | This parameter represents all the properties must be provided to create a document on the library and they are defined on the profile. Properties must be passed as a string. | String |
client | Optional parameter for the client code | String |
project | Optional parameter for the project code | String |
Notes:
- By default the new document is created without security.
- 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:
- “/UploadDocument/?path={path}&form={form}&library={library}&user={user}&password={password}&properties={properties}&client={client}&project={project}”
- “/UploadDocumentDST/?path={path}&form={form}&library={library}&user={user}&dst={dst}&properties={properties}&client={client}&project={project}”
Example
http://localhost:8732/GSService/xml/UploadDocument/?path=C:\Users\Admin\Documents\SolutionSchema.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&password=owc123&properties=SolutionSchema admin DEFAULT DEFAULT DEFAULT admin SolutionSchema ACROBAT
The method returns the new document number if it has been properly uploaded into the library.
DST Example
http://localhost:8732/GSService/xml/UploadDocumentDST/?path=C:\Users\Admin\Documents\SolutionSchema.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&properties=SolutionSchema admin DEFAULT DEFAULT DEFAULT admin SolutionSchema ACROBAT
Error
If the process fails, different errors could be returned (-6 value means security access problems, review permissions on the folder where the document is placed). Detailed errors can be found in the error log. See Appendix D for more information about the edocs.log file.