Portlet Factory, Version 6.1.2


 

File Upload builder

The File Upload builder allows users to copy files from their client computer to a specific directory on the machine hosting the IBM® WebSphere Portlet Factory servlet.

To support this upload functionality, the File Upload builder creates a page control that is used for selecting and uploading a file to the server. The HTML control created is of the form <input type="FILE"/>. This control must exist within a <form> element on the page.

For an HTML page which has a control such as <span name="uploadit" /> or pre-existing <input name="uploadit"/> , you can apply this builder to that control, and the necessary attributes of that control are set for file upload. The parent form has its encoding type set appropriately for file upload and the form method is set to type POST.

Post such elements with an <input type="submit"> button. For example, if you use the Button builder to enable form submission, for the Action Type input, select Submit form and invoke action, not Link to an action.

Note: WebSphere Portlet Factory must have file upload functionality enabled by a property setting.

 

File Upload builder operation

When the page is submitted, the following actions occur.

  1. The builder checks for the maximum file size.

  2. The file is uploaded in the directory specified in the builder subfolder input, provided that the file does not have the same name as a previously saved file in the directory.

  3. The file is saved with the name specified.

  4. The builder verifies whether a pre-existing file with the same name should be overwritten.

Parent topic: Builder help


Library | Support |