Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title**Free
collapsetrue
DCL-DS UPLOADINFO QUALIFIED;
    NUMFILES ZONED(3:0);
    DIRECTORY CHAR(256);
    FILES CHAR(256) DIM(6n);
END-DS UPLOADINFO; 

...


The name of the data structure in the application must match exactly to the field bound to this property. The "Files" subfield must be dimensioned "n" times, which should be the same value used to calculate the response field length and the same value used for the "number of files" property.

...

An example of using the file upload response can be found in the example program in library PUISAMPLES. The display file is member UPLD001D in file QDDSSRC. The RPG code is member UPLD001R in file QRPGLESRC.

Using Upload Response with Profound.js

The upload response data structure can be used in a Profound.js module similarly to how its used in RPG. 

The data structure should be defined in the program as follows: 

Code Block
languagejs
pjs.define("upload_info", { type: "data structure", qualified: true, elements: {
    "num_files": { type: "zoned", length: 3, decimals: 0 },
    "directory": { type: "char", length: 256 },
    "files": { type: "char", length: 256, dim: 2}
  }});

An example of how to use the file upload response with Profound.js can be found in the example program in the pjssamples folder in your Profound.js installation directory: /profoundjs/modules/pjssamples/. The example program is named upload.js and uses the upload.json display file.