Biferno 1.7 Tabasoft.it

Application: ItaliaScuola Back-Office3
Reference
Admin | Edit | Reference | Cache | Logs
Click on a class name to see the description of that particular class:

Predefined Classes

ansi
array
biferno
boolean
cacheItem
char
classInfo
client
collection
curApp
curFile
curScript
db
double
error
file
folder
header
httpPage
imageUtils
int
long
memberInfo
multipart
object
ref
regexp
request
search
serverInfo
smtp
stackItem
string
time
unix
unsigned
 

Application Classes

Banner
BrowserBar
Ctrl_Form
FCKeditor
Form
GridChartGraph
Histogram
LocalDate
Result
condb
cookie
folderExt
headerExt
httpExt
mysqlFulltext
objHtml
requestExt
tableExport
utils
 

Functions

Functions

multipart

Methods

Properties

Constants

Errors

ToFilecontentType
data
name
path

Class

Class to handle multipart/form-data file objects

Description:

The multipart class describes data captured in a HTML form in the “multipart/form-data” encoding when a file is uploaded from a Web page.

SeeAlso:

Err_MultipartObjectDuplicated

Note:

The following example shows a HTML form with an input element of type file. The “enctype” attribute of a HTML form specifies the kind of content, and therefore the type of encoding, of the data set to be transmitted to the server.

<html>
<body>
	<form method="post" 
		action="handle_file.bfr" 
		enctype="multipart/form-data">
	File to send:
	<input type="file" name="the_file"><br>
	<input type="submit" value="Send file">
	</form>
</body>
</html>

In the target Biferno script a variable, with name "the_file", of the multipart class is associated to the form input element of type file.

In the same form cannot be declared two input fields of type "file" with the same name. In that case the target script will return the error: Err_MultipartObjectDuplicated.

Implementation:
C
 

Constructor
void multipart(string data, string path, string contentType)

Instantiates a multipart object

Description:

A multipart object is automatically created when a script is invoked by a "multipart/form-data" POST data (see example below). It is also possible to initialize a multipart instance using the constructor and passing it the data "simulating" a file stream created by a "multipart/form-data" (a virtual file).

Parameters:
data

The content of the virtual file

path

The path of the virtual file

contentType

The content type of the virtual file (using the same string format of an HTTP header Content-type field)

Implementation:
C