File upload

The user is able to upload files to the server by using submission.

File upload can be specified by setting Submission mediaType to multipart/form-data. However, even though it is set to another value, the previous set value is ignored and it is processed as a multipart/form-data when adding uploading file in submission.

Upload File Protocol
ProtocolDescription
multipart/form-data;encoding=json Each uploaded file is separated into individual parts, and DataSet and DataMap data including parameters are packaged as one JSON Object and sent to the server.
multipart/form-data All data transmitted to the server, such as uploaded files, DataSet including parameters, and DataMap data, are separated into individual parts and transmitted to the server.

How to set file upload

Set file upload in submission property dialog box
파일업로드설정

Example of script code

/** 
 * @type cpr.protocols.Submission
 */
var subSave = app.lookup("sub_save");
subSave.addFileParameter("fileparametername", file);

subSave.send();

User can upload multiple files at the same time.

User can send DataSet, DataMap and Parameter with file.

See!