BBjFileUpload
Description
In BBj 14.00 and higher, BBjFileUpload contains all of the information related to files uploaded to a Servlet.
Creation
BBxServletContext > BBxServletRequest > BBjFileUpload
A BBjFileUpload object is obtained with the following BBxServletRequest method:
Return Value | Method |
---|---|
BBjFileUpload | getFileUpload(string fieldName) |
Deprecated Creation
BBjServletEvent > BBjHttpRequest > BBjFileUpload
Return Value | Method |
---|---|
BBjFileUpload | BBjHttpRequest::getFileUpload(string name) |
BBjFileUpload | BBjspWebRequest::getFileUpload(string name) |
Methods of BBjFileUpload
Return Value |
Method |
---|---|
long |
|
string |
|
string |
|
string |
|
string |
Remarks
The example below demonstrates how to upload files to a servlet. When the servlet is executed, the uploaded files are stored temporarily and it is the responsibility of the developer to copy the files during the servlet execution cycle. All the files are removed when the servlet execution ends.
The form used for the HTTP Post needs to specify: enctype='multipart/form-data'
The form elements should have unique name identifiers which can be used with the getFileUpload(string name) method.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.