When a user click's the upload applet's "Add Files/Directory" button, a file selection window will open. JFile allows you to display either the system's native file selection dialog, or JFile's platform-neutral file selector. By default, JFile displays the system's native file selection dialog. To use JFile's file selector, set UseNativeFileSelection to 0. File Selector VersionsJFile 2.1 includes a new version of the platform-neutral file selector that offers an improved user interface and several new features. For backward compatibility, the earlier version of the file selector is still available. To use the earlier version, see File Selector Version 1.
Text CustomizationJFile's file selector includes several text parameters that enable customization of all of the text displayed in the selection window. This allows you to change the language displayed in the file selector. Color ParametersUse the file selector's color parameters to change the colors of background, button, file list box, and text. The color parameters allow you to modify the file selector's appearance to suit your application. Sorting Files and FoldersThe user may sort files and folders displayed in the file selection window by name, size, or last modified date. To sort the files and folders by one of these attributes, the user clicks one of three buttons at the top of the file/folder list text box. You may change the text displayed on these buttons by setting ButtonFileSorterText, ButtonSizeSorterText, and ButtonDateSorterText. File FiltersUse the parameter FileFilterN to limit the file types that will be displayed in the file selector's extension field. The file filters are displayed in a drop-down list box. The listed filters include a filter name followed by a filter, for example, Web files(*.htm, *.asp). Directory Uploads and Recursive Directory UploadsThe user can select files and/or directories to upload. JFile can upload a directory without its sub-directories, or recursively, that is, with its sub-directories, maintaining the original directory structure. To upload recursively, the user must check the upload type check box. To prevent recursive uploads you can hide the check box by setting HideRecursiveCheckBox to 1. See also, RecursiveCheckBoxOn. Selecting Multiple FilesUsing either the Shift or Ctrl key, the user can select several files to upload. To select more than one file within JFile's file selector, press Shift or Ctrl and, while the key is pressed, select the files. |
|||
File Selector Parameters
|
|
<APPLET codebase="/JFileScripts" code="softartisans.filetransfer.UploadClient.class"
height="0" width="0" mayscript archive="filetransfer.jar" name="fileupload">
<!-- The Cabbase parameter specifies the cab file containing the applet. -->
<PARAM name="cabbase" value="filetransfer.cab">
<!-- The PostURL parameter specifies the URL to which the file will be posted. -->
<PARAM name="PostURL" value="http://localhost/jfilescripts/formresp.asp">
<!-- Setting UseNativeFileSelection to 0 enables JFile's file selector. -->
<param name="UseNativeFileSelection" value="0">
<!-- The file selector text parameters allow you to change all of the
text displayed in the file selection window. -->
<param name="CustomFileSelectorTitleText" value="Select files/folders to upload">
<param name="LabelLookInText" value="Search">
<param name="ButtonBackText" value="Previous Directory">
<param name="ButtonUpText" value="">
<param name="ButtonFileSorterText " value="Name">
<param name="ButtonSizeSorterText" value="File Size">
<param name="ButtonDateSorterText" value="Date last modified">
<param name="LabelUploadTypeSelectorText" value="Upload Type">
<param name="LabelExtenstionSelectorText" value="File Types">
<param name="ButtonCancelText" value="Quit">
<param name="ButtonDoneText" value="Apply">
<!-- The FileFilter parameter allows you to list file
type filters in the file type field. The user can filter the file
display by selecting a filter from the drop-down list.-->
<param name="FileFilter1" value="All files(*.*)">
<param name="FileFilter2" value="Web files(*.htm, *.asp)">
<param name="FileFilter3" value="Word Document(*.doc)">
</APPLET>
http://localhost/jfilescripts/upload_fileselector.htm
.APPLET
tag adds JFile's UploadClient applet to your web page. We assigned values to several APPLET
attributes:Codebase
Codebase
is optional. When the Java class is in a different
directory, specify the complete relative path or URL.Code
Height
and Width
UseAppletInBrowser
to 1, as follows.
<PARAM name="UseAppletInBrowser" value=1>
If you do not set UseAppletInBrowser
to 1, that is, if you display the applet in a separate window, set
Height
and Width
to 0.Mayscript
Archive
Name
Name
. Use the
name you assign to reference the UploadClient applet in script.Cabbase
parameter specifies the cab file containing the Java applet. Filetransfer.cab contains JFile's Java
class files for Microsoft VM.PostURL
parameter specifies the URL to which the file will be posted, http://localhost/jfilescripts/formresp.asp.
Formresp.asp uses SoftArtisans FileUp to process the upload.UseNativeFileSelection
is set to 0, JFile will use a platform-neutral
file selection dialog.CustomFileSelectorTitleText
, etc.)
allow you to change all text in the dialog window. You can assign non-English values
to these parameters.FileFilterN
adds one or more file type filters to the
file selector. The file filters are displayed in a drop-down list box.
The value of FileFilterN includes a filter name and one or more
filters, as follows, FilterName (Filter1, Filter2, etc.).Copyright © 2000-2003 SoftArtisans, Inc. All rights reserved.