Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor typo and grammar changes

...

For example, the file upload widget has several validation properties, such as the number of files that can be uploaded, there their maximum sizes, etc. To eliminate any chance of a clever hacker faking these values, the file upload control uses an exit program which is called for each file upload and must "approve" the file upload using the actual file details that were received at the server.

...

Customer exit programs will not be modified or replaced during a product update installation; however, the PUIUPLEXIT source member will be overwritten with an update. We recommend saving your source member into a different library.

...

The following parameters are passed to the exit program:

  • FileInfo (input): This datastructure data structure contains useful information that the exit program can use to decide whether or not to allow uploading the file. The parameter contains the following subfields:
    • WidgetId: The id (as specified in the "id" property) of the file upload widget used in this transaction.
    • Directory: The directory where the file will be uploaded to.
    • Name: The name of the file.
    • Type: The Internet Media Type (i.e. 'text/plain', 'image/gif', etc.) of the file, as reported by the user agent.
    • Size: The size (in bytes) of the file.
    • Exists: *On if the file already exists on the IFS, *Off otherwise.
  • Allow (output): The exit program returns 1 in this field to allow the file upload. Any other value returned in this field results in the file upload being prevented.
  • ErrorMsg (output): An error message to be displayed when the exit program prevents a file upload. If not populated, a generic error message will be given when a file upload is prevented. This parameter is ignored completely when the exit program allows the file upload.

...