Portlet Factory, Version 6.1.2
Enabling and configuring file upload
To use the File Upload builder, enable file uploading.
- Locate the .../WEB-INF/config/cluster.properties file.
- In this file locate the following section:
# [ bowstreet.upload ] # File Upload Settings # This determines whether file upload is active for this server. bowstreet.upload.enabled= # This sets the directory where uploaded files will be stored upon successful upload. bowstreet.upload.destinationPath=${bowstreet.rootDirectory}/upload # This determines the maximum file size that can be uploaded at one time in KiloBytes. bowstreet.upload.maxFileSizeK=500- Enable File Upload: Set the value of bowstreet.upload.enabled= to true.
- Upload Destination Path: Set this property to the location in the WebSphere Portlet Factory servlet file system where the uploaded file will be temporarily stored.
- Upload Maximum File Size (KB): This option puts a limit on how many kilobytes can be uploaded at a time (default 500 KB). If you are using multiple File Upload builders on a page, the combined size of all files being uploaded from a single submit action must not exceed the limit specified in the Maximum File Size K field. Exceeding the upload limit will cause the upload to fail.
Note: To override.properties, first add them to WEB-IFN/config/override.properties and then redeploy the application WAR, to make sure the new file upload enabled setting is deployed and upload is actually enabled, before trying to do a file upload.
Note: If you use Microsoft Internet Explorer to upload a file that is more than the maximum file size specified, the web browser interprets that as a web page that cannot be found. As a result, you will be shown the default error message for your application server when the browser cannot find a web page.
On the page that contains the File Upload control, you may want to include some text explaining the what the user can expect if they try to upload a file whose size is greater than the maximum file size property. There is no graceful way to handle the event (for example, using an error handler method) in which a user tries to upload a file greater than the size allowed because the processing takes place within the browser, not in the WebSphere Portlet Factory servlet.
Parent topic: File Upload builder
Library | Support |