Objective
It allows to upload a new document into an existing folder but in this case it is necessary to provide the content of the document in Base64Binary. DST must be provided.
Parameters
Parameter | Description | Type |
folderNumber | Document number of the destination folder. | Integer |
document | The content of the document to upload to the DM Library. | 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 |
propProfileString | Document properties. | String |
propFolderItemString | This 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 |
uploadUser | The user who uploading the document to 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 permission, the action is aborted. If no value is passed for this parameter, the value on the “user” parameter is used instead. | String |
client | Optional parameter for the client code | String |
project | Optional parameter for the project code | String |
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:
- “/UploadDocumentAsBinaryToFolder/?folderNumber={folderNumber}&document={document}&form={form}&library={library}&user={user}&password={password}&propProfileString={propProfileString}&propFolderItemString={propFolderItemString}&uploadUser={uploadUser}&client={client}&project={project}”
- “/UploadDocumentAsBinaryToFolderDST/?folderNumber={folderNumber}&document={document}&form={form}&library={library}&user={user}&dst={dst}&propProfileString={propProfileString}&propFolderItemString={propFolderItemString}&uploadUser={uploadUser}&client={client}&project={project}”
Example
http://localhost:8732/GSService/xml/UploadDocumentAsBinaryToFolder/?folderNumber=748&document=RXN0byBlcyB1bmEgcHJ1ZWJhIHBhcmEgc3ViaXIgdW4gZG9jdW1lbnRvIHkgY29udmVydGlyIHN1IGNvbnRlbmlkbyBhIEJhc2U2NA==&form=LAWPROF&library=DMTESTLEGAL&user=admin&password=owc123&propProfileString=Prueba admin DEFAULT DEFAULT DEFAULT admin Prueba ACROBAT
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/UploadDocumentAsBinaryToFolderDST/?folderNumber=748&document=RXN0byBlcyB1bmEgcHJ1ZWJhIHBhcmEgc3ViaXIgdW4gZG9jdW1lbnRvIHkgY29udmVydGlyIHN1IGNvbnRlbmlkbyBhIEJhc2U2NA==&form=LAWPROF&library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&propProfileString=Prueba adminUTHOR_ID> DEFAULT DEFAULT DEFAULT adminTYPIST_ID> Prueba ACROBAT