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.
- The builder checks for the maximum file size.
- 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.
- The file is saved with the name specified.
- The builder verifies whether a pre-existing file with the same name should be overwritten.
Parent topic: Builder help
- About using the builder call editor
The builder call editor allows you to specify all the input values to a builder call.
- Locating control builder calls on pages
Each page location technique results in the generation of a Page Location string that determines on what pages, and where on those pages, the control builder calls are added.
- File Upload builder inputs
This topic describes the inputs for the File Upload builder.
- Overview: creating forms
You can create forms in IBM WebSphere Portlet Factory applications in several ways.
- An indirect reference usage for a dynamic upload path
To create a dynamic upload path, where a user can enter a path to be used for the upload, you can build a model that provides a subfolder field
- Error: Exception is thrown out when upload a file which size is exceed the limit
With the Process Upload Errors input enabled, you can choose to handle the errors yourself.
- Enabling and configuring file upload
To use the File Upload builder, enable file uploading.
Library | Support |