PATH
WebObjects 4.0 Documentation >
What's New in WebObjects 4.0
Table of Contents Previous Section
New Dynamic Element: WOFileUpload
A WOFileUpload element displays a form element in which a client browser can specify a file to be uploaded to the server. It corresponds to the HTML: <INPUT type=file>.
Note: WOFileUpload elements inside of a WOForm require that the WOForm have the attribute's encoding type set as follows:
enctype = "multipart/form-data"
For further information on the file upload specification, see RFC1867: http://www.w3.org/RT/REC-html32.html#rfc1867.
WOFileUpload has the following attributes:
If you want to process a file upload in a direct action, use WORequest's formValueForKey: method to get the contents of the file that has been uploaded. This method previously returned an NSString. It is now declared as follows:
- (id)formValueForKey:(NSString *)aKey
or, in Java,
public java.lang.Object formValueForKey(java.lang.String aKey)
Table of Contents Next Section