JSPSMARTUPLOAD : DOCUMENTATION
SmartUpload Object
Last modified: March 1st, 2000
© 2000 Advantys. All rights reserved.

The SmartUpload Object

The SmartUpload object can be created in a JSP program.

Syntax
<%@ page language="java" import="java.sql.*,com.jspsmart.upload.*"%>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />


Collections

Files Files collection of File objects.
Request Request collection of Item objects.

Properties

getBinaryData Byte corresponding to the table index containing the transmitted data.
getFiles Returns the collection of the uploaded files .
getRequest Returns the request object..
getSize Size in bytes of the POST form.
setAllowedFilesList Contains the upload authorized file extensions list.
setContentDisposition Sets the content-disposition headers of the MIME Type.
setDeniedFilesList Contains the upload denied file extensions list.
setDenyPhysicalPath Prevents file saving in directories other than virtual directories.
setMaxFileSize Maximum allowed size of one file to be uploaded.
setTotalMaxFileSize Maximum allowed size of all files to be uploaded.

Methods

downloadField Download a file from a DataBase.
downloadFile Download a file.
fieldToFile Create a file with a DataBase field.
save Save all files.
upLoad UpLoad the POST form.
uploadInFile Save the POST form in a file.
SmartUpload Creates an new SmartUpload instance .

The files object

Syntax
myFiles.Collection | Properties | Method

Collection

File File objects.

Properties

getCount Number of File's objects.
getSize Size in bytes of the files collection.

Method

getFile(ID) (Default method) Returns the File object with the specified ID.

The File object

Syntax
myFile.Proprerties | Methods

Properties

getBinaryData Byte corresponding to the table index containing the transmitted data.
getContentDisp Content-disposition of the POST form.
getContentString Returns the content of file in one string.
getContentType File's content-type entered by the user.
getFieldName Name of this item of the POST form.
getFileExt File's extension entered by the user.
getFileName File's name entered by the user.
getFilePathName File's path entered by the user.
getSize File's size.
getSubTypeMIME Return the MIME sub-type entered by the user.
getTypeMIME Return the MIME type entered by the user.
isMissing Return true if the user has not specified a file.

Methods

fileToField Save a file in a field of a DataBase.
saveAs Save the file on the disk. Always overwrites existing files.

The Request object

Syntax
myRequest.Properties

Properties

getParameter Returns the value of a request parameter.
getParameterName Returns an Enumeration of objects containing in the Request object.
getParameterValues Return values of a request parameter.

© 2000 Advantys. All rights reserved.