The filetransfer web method is used to transfer files from the client machine to the Launcher server. When calling this web method, the data that needs to be sent is not written in a JSON message, instead it is included as form-data. The data that must be included when calling the filetransfer method are the client id, the destination file name, the destination directory, and the file itself that is to be uploaded. Here is an example:
POST /launcher/filetransfer HTTP/1.1
Host: localhost:9090
Cache-Control: no-cache
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data;
name="id"
1
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data;
name="destFileName"
Example_doc.pdf
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data;
name="destDir"
C:\Temp
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="file"
C:\Temp\test.pdf
The above example will transfer the attached file to the server, where it will be saved in C:\Temp with the file name Example_doc.pdf. Note that the complete file path including the directory and filename can be passed in the “destFileName” field of the form data, in which case the “destDir” field is not required.
Attaching the file as form data can be achieved in different ways depending on the language that the client is written in. See the examples into the installation directory