file_field(name = "", size = 20, maxlength = nil)
Instance Public methods
Generate an File Upload Input element as a string.
The attributes of the element can be specified as three arguments,
name
, size
, and maxlength
.
maxlength
is the maximum length of the file's
name, not of the file's contents.
Alternatively, the attributes can be specified as a hash.
See multipart_form() for forms that include file uploads.
1 2 3 4 5 6 7 8 9 10 11 | file_field( "name" ) # <INPUT TYPE="file" NAME="name" SIZE="20"> file_field( "name" , 40 ) # <INPUT TYPE="file" NAME="name" SIZE="40"> file_field( "name" , 40 , 100 ) # <INPUT TYPE="file" NAME="name" SIZE="40" MAXLENGTH="100"> file_field( "NAME" => "name" , "SIZE" => 40 ) # <INPUT TYPE="file" NAME="name" SIZE="40"> |
Please login to continue.