3.1 Minimum System Requirements
3.2 User Interface
3.3 Running U-Upload
3.4 Directory browsing
3.5 Selecting files and directories
3.6 Uploading files
4.1 Connection parameters
4.2 Proxy parameters
4.3 Functionality related parameters
4.4 Color settings
4.5 Error URL parameters
4.6 Secure FTP Settings
4.7 Language settings and internationalization
5.1 Advanced file selection
5.2 Resuming broken or interrupted transfers
5.3 Loading U-Upload dynamically
5.4 Integrating U-Upload with your web applications
5.5 Using the autoupload feature
5.6 Accessing U-Upload's functionality from JavaScript
5.7 Secure FTP using FTPS
5.8 Secure FTP using SFTP
5.9 Secure FTP using UnlimitedFTP Servlet
This guide is intended to be a comprehensive description of U-Upload Pro and U-Upload Secure, and will provide information not only for installing the applet, but for customization.
The guide attempts to use generic examples; therefore, simply make the appropriate substitutions. For example, if the guide refers to a file called "uupload.js", you should assume that the pro version's filename is actually "uuploadpro.js" and that the secure version uses "uuploadsecure.js". When in doubt, simply look in your archive and the appropriate filename should be clear.
U-Upload is an FTP file upload applet with over 70 customizable parameters. Using U-Upload's parameters, you can create fully customized, simple to use, file upload site for your users. To customize U-Upload, you must edit "uupload.js" with an HTML or text editor. You can then use the tables found in this document as a guide to customizing each of U-Upload's parameters.
Consult section 2 of this document for configuration and installation notes
Please also review the License files.
The following is a list of the main features of U-Upload.
Embedding the applet into your web page is simple. In an appropriate spot of your HTML, add the appropriate line.
U-Upload Pro:
<script language="javascript" src="uuploadpro.js"></script>
U-Upload Secure:
<script language="javascript" src="uuploadsecure.js"></script>
In the above example, uupload.js must be in the same directory as the applet and the page that loads it. You may instead set the "src" parameter to indicate a path to the script.
To customize U-Upload, you will typically:
U-Upload requires a minimum configuration in order to function. You must setup the "server", "user" and "pass" parameters so U-Upload can connect to your FTP server and upload files. To do this you must edit the file uupload.js with a text editor and set the values to reflect your FTP server. For example:
//Connection related values
var server = "ftp.yourserver.com";
var port = "";
var user = "username";
var pass = "password";
Additional configuration parameters are described in Section 4
The minimum system requirements for using U-Upload are as follows:
Below is a screen shot of the U-Upload user interface. Depending on your Operating System and browser, as well as the parameters you have configured, your display may differ slightly.
![]() |
| Fig 3.1The U-Upload interface |
To load U-Upload, use your web browser to open the test page you uploaded during installation. See Deploying to a web server. Upon loading U-Upload a dialog will be presented similar to the one shown below asking you to confirm that you trust the certificate used to sign the applet. The dialog may vary depending on the browser you use. You must accept this dialog for the applet to continue loading. To avoid this dialog from being displayed each time you connect click on the "Always trust content from Unlimi-Tech Software Inc." checkbox in IE, or on the "Always" button if you use Sun's Java Plugin. This dialog ensures that U-Upload is a trusted application, and you wish to allow it to run with full permissions.
![]() |
| Fig 3.2.1 Internet Explorer with Microsoft VM security warning |
![]() |
| Fig 3.2.2 Sun Java Plugin security warning |
| Fig 3.2.3 Internet Explorer with security warning |
| Fig 3.2.4 Sun Java Plugin security warning |
| Fig 3.2.5 Microsoft Java Plugin security warning |
![]() |
| Fig 3.3 Safari Browser with security warning |
Once you have accepted the certificate dialog, U-Upload will continue loading.
When you click on the Browse button, U-Upload will display a dialog similar to the one displayed in Figure 3.4 below. Folders are identified by the folder icon
and files are identified by the file icon
. To see the contents of a sub folder, double click on its icon. You may return to a parent folder by clicking on the parent folder icon
.
You may browse directories with your keyboard, using the up/down arrows and the Enter key. You may quickly jump to a file beginning with a particular letter by pressing that letter on your keyboard. Pressing Enter while a folder is selected will automatically open that folder for browsing. Pressing Enter with a file selected is equivalent to using the Open button.
![]() |
| Fig 3.4 U-Upload browse dialog |
To select a file or folder, click on the item in the directory listing using your mouse. You may select a multiple of files by holding down the SHIFT key and selecting the first and last file in the desired range. Alternatively you may select multiple items by holding the CTRL key and selecting each item using your mouse. When you have selected the files you wish to upload, click on the Open button. Mac OS 9.x users may use the left and right arrow buttons to select multiple files.
To upload the files you have selected, simply click on the "Upload" button and the file upload should be initiated. Depending on your configuration, you will see a progress dialog similar to the one in Figure 3.5 below. You may configure U-Upload to redirect to another page upon completion.
![]() |
| Fig 3.5 Progress dialog |
These settings can be configured in uupload.js. Note that every time you change these settings, you will need to upload the modified uupload.js file.
These parameters control how U-Upload will establish the connection to the FTP server. Please note that some parameters are only available in certain versions. The U-Upload version that supports the particular parameter is noted under the description of each parameter.
| Connection-related Settings | |
|---|---|
| server | The host name or IP address of the FTP server. Default value: "" |
| port | The port number of the FTP server. Typically, FTP uses port 21. Default value: "21" |
| pass | The password for the FTP server account. Default value: "" |
| user | The username for the FTP server account. Default value: "" |
| passive | If set to "true", all data connections will be outgoing. U-Upload works through firewalls when this value is set to "true". If you are using an FTP proxy, set this value to "false". Default value: "true" |
| encrypt | If set to "true" you must pass encrypted user/pass/server parameters to U-Upload, which will decrypt them and perform the login. The encryption is based on a key value that is specified by the "ek" parameter below. To encrypt parameters you can use encrypt.html that was downloaded with U-Upload Pro or Secure. This provides at least some measure of protection from prying eyes, and people who love to snoop through your HTML. Although this seems very un-secure to include the encryption algorithm along with the applet, keep in mind this is only a way to hide login credentials from users who try to view the HTML source of your page. Determined hackers will easily be able to sniff the network to retrieve user and password info regardless of the encryption done in the HTML. Default value: "false" |
| ek | This parameter works in conjunction with the "encrypt" parameter. This is the key that is used to encode/decode the string value you pass to the user, pass, and server parameters. Here is an example configuration. In this example, the server/user/pass strings are 192.168.1.100/anonymous/uftp@unlimitedftp.com respectively. This illustrates how the parameters will look to anyone who inspects the connection values in your HTML: var server = "8I7BLHN;8I8@5"; Default value: "" |
| connecttimeout | This value (in milliseconds) specifies how long U-Upload will try to connect to an FTP server before giving up and timing out. Default value: "20000" |
| sotimeout | This value (in milliseconds) specifies how long a data connection will wait to read data before giving up and timing out. Default value: "-1" means no timeout |
| waitRetry | This value (in milliseconds) specifies how long U-Upload will wait, if a transfer error occurs, before it tries to reconnect and resume the transfer. Default value: "3000" (3 seconds) |
| maxRetries | This value specifies how many times U-Upload will try, if a transfer error occurs, to reconnect and resume the transfer. Default value: "1" |
| useSerfo | If set to true, U-Upload will attempt to open an FTP connection through the Service Forwarding Agent at the URL specified by the "SerfoLocation" parameter below. If set to auto, U-Upload will first attempt to open a regular FTP connection, and if it fails, it will retry through the Service Forwarding Agent at the URL specified by the "SerfoLocation" parameter below. Default value: "false" |
| serfoLocation | The location of the Service Forwarding Agent servlet. Please visit http://www.utechsoft.com/uftps for more information. Default value: "" |
| servletUploadMultiplier | When uploading using UnlimitedFTP Servlet, uploads are broken into smaller pieces which are assembled on the server. The size of these pieces is determined by the current rate of transfer multiplied by this value. To increase speed, increase this value. The side effect is that the progress bar will be uploaded less frequently. The default value of 2 ensures an update every 2 seconds. Default value: "2" |
| enableHTTPResume | When "userSerfo" is set to "true", this value allows you to force uploads to first be saved on the web server before being transferred to the FTP server. This is useful if your FTP server executes scripts or commands that rely on the STOR command. The default functionality, "enableHTTPResume" set to "true", is to stream files directly to your FTP server using a series of APPE commands rather than one STOR command. This may cause your FTP server to execute a script before the file is fully transferred. Default value: "true" |
These parameters allow you to configure U-Upload to connect through a SOCKS4 or FTP proxy server. Please contact your network administrator or ISP to determine if you use a proxy server for FTP.
| Proxy server related settings. (Internet Explorer Only) | |
|---|---|
| autodetectproxy | If this value is set to "true", U-Upload will automatically attempt to detect Internet Explorer's Proxy setup and use it when connecting to FTP servers. This will detect both SOCKS 4 proxy settings, and FTP proxy settings. Default value: "false" |
| socksproxy | If this value is set to "true", U-Upload will use the SOCKS proxy server and port specified by the "socksProxyHost" and "socksProxyPort" parameters. Default value: "false" |
| socksProxyHost | SOCKS proxy server location. Default value: "" |
| socksProxyPort | SOCKS proxy server port. Default value: "" |
| ftpproxy | If this value is set to "true" and socksproxy is set to "false", U-Upload will use the FTP proxy server and port specified by the "ftpProxyHost" and "ftpProxyPort" parameters. Default value: "false" |
| ftpProxyHost | FTP proxy server location. Default value: "" |
| ftpProxyPort | FTP proxy server port. Default value: "" |
These parameters determine how U-Upload will behave under certain circumstances after a connection is established. Please read the descriptions carefully before attempting to use these settings.
| Functionality related settings | |
|---|---|
| mode | Transfer method can be set to either "data" or "macbin"; the default is data. This parameter only works on the Mac OS platform. When the method is set to "macbin", U-Upload will automatically encode each file into a Mac Binary format on MAC. MacBinary format is Internet friendly and allows all Mac files to be transferred to other platforms without any problems. IMPORTANT:Setting macbin will still transfer windows files in data mode. NOTE: Macbinary will not function in OS X 10.2 or higher. Default value: "data" (MacOS only) |
| localdir | U-Upload will automatically browse this local directory when first loaded into the browser. For example, "c:\\windows" on a Windows machine or "/etc" on Mac or Unix. Default value: "" |
| remotedir | U-Upload will automatically switch to this directory on the FTP server after a successful login. Example would be "/initialdir". Note that this directory must already exist, or must be specified to be created with the "createdirectoryonstartup" parameter. Default value: "" |
| exclude | Allows you to exclude files or directories who's names contain strings specified in this parameter. For example, if you wanted to exclude all files starting with the letters "re", exclude the Program Files directory, and also hide the D:\\ drive this parameter would be set like this: "*re*,Program Files,D:\\". This parameter also allows you to use wildcards to exclude files of a certain pattern. For example, to exclude files that are numbered file1_of_10.txt you could set this parameter to "file*_of_*.txt". Default value: "" |
| createdirectoryonstartup | This parameter specifies a remote directory that should be created when an FTP connection is established. Default value: "" |
| filefilterX | Where X = 1 to N. You can define as many file filters as you want to using this parameter, as long as each value X is distinct. Here are some examples: var filefilter1 = "All Files (*.*)"; These parameters must be of this form to function properly. Notice there are no spaces between the extensions. Default value: "" |
| showdialogs | Toggles the status, and progress dialogs on and off. Default value: "true" |
| maintainpathinfo | If this parameter is set to "true", all path info is maintained when files are uploaded. Otherwise the path info is not included. This parameter will also maintian the absolute path info regarding target file of uploaded windows shortcut (.lnk) files. Default value: "true" |
| autozip | If this parameter is set to "true", all selected files will be compressed using ZIP compression. Default value: "false" |
| rezip | If set to "true", U-Upload will re-zip files that are already in Zip format. Default value: "false" |
| zipfilename | Used in conjunction with the "autozip" parameter, this parameter specifies the filename for the compressed archive. Default value: "files.zip" |
| zippathinfo | If this parameter is set to "true", all path info is maintained in the zip archive. Otherwise the path info is not included. Default value: "false" |
| confirmoverwrite | If this value is set to "true", U-Upload will prompt you if the file(s) already exist on the FTP server. You will have the choice to overwrite if you want to. If set to false, U-Upload will always overwrite. Default value: "false" |
| callurlaftertransfer | U-Upload will redirect to this URL when the transfer is complete and was successful. The url will be appended with a common base folder of all the files uploaded and total size of all uploaded files. NOTE: if you are simply testing with a URL like http://www.utechsoft.com, you should append a / on the end to avoid 404 errors. Default value: "" |
| callurlaftertransfertarget | Used in conjunction with callurlaftertransfer, this parameter specifies the target for the redirection. Default value: "_self" |
| transfererrorurl | U-Upload will redirect to this URL if an error occurred during the file transfer, or the network connection is terminated. This URL is also called if U-Upload has attempted to restart the transfer more than the number of tries specified by the "maxRetries" parameter. Default value: "" |
| transfererrorurltarget | Used in conjunction with transfererrorurl, this parameter specifies the target for the redirection. Default value: "_self" |
| transfercancelurl | U-Upload will redirect to this URL if the transfer is canceled. Default value: "" |
| transfercancelurltarget | Used in conjunction with transfercancelurl, this parameter specifies the target for the redirection. Default value: "_self" |
| redirectfilenotexisturl | U-Upload will redirect to this URL if, when the Send button is pressed, the selected files do not exist. Default value: "" |
| redirectfilenotexisturltarget | Used in conjunction with redirectfilenotexisturl, this parameter specifies the target for the redirection. Default value: "-self" |
| othererrorurl | U-Upload will redirect to this URL if any other errors occur. This may include login or connection errors. Default value: "" |
| othererrorurltarget | Used in conjunction with othererrorurl, this parameter specifies the target for the redirection. Default value: "_self" |
| site | This is an FTP Site command that will be executed immediately before the upload is initiated. This is useful for connecting to FTP server that require a specific file format to be specified before transferring. Setting this to a value of "help" would result in "SITE help" being sent to the FTP server. Default value: "" |
| autoupload | Used in conjunction with "fileset" parameter, if set to "true" U-Upload will automatically begin transferring the files specified in "fileset" once it loads. NOTE: This parameter only works in licensed versions. Default value: "false" |
| fileset | This parameter will add files to U-Upload as a semicolon delimited list of full paths to files. When used with the "autoupload" you can completely automate the upload of files. Here is an example for Windows (note the double-slashes replacing single): fileset = "c:\\temp\\file1.exe;c:\\images\\image.jpg;d:\\Program Files\\file2.exe"; or on UNIX or Mac: fileset = "/home/joebloe/web/index.html;/tmp/image.jpg"; You can also specify a widcard value to only upload files of a certain type, for example: fileset = "/home/joebloe/*.jpg;/tmp/*.gz"; Default value: "" |
| filesetrename | Used with the "fileset" parameter, this parameter allows you to rename files as they are transferred to the FTP server. A valid value for this parameter will be a semicolon delimited list of remote file names. Note: no path is required for these values as they will be stored in the directory specified in the "remotedir" parameter. Note that the number of values in the list must be equal to the number of values in the "fileset" parameter or this parameter will be ignored. It will also be ignored if you use wildcards in the fileset parameter. If this parameter is set, the "maintainpathinfo" parameter is automatically disabled. Here is an example usage: filesetrename = "file1.exe;image.jpg;file2.exe"; Default value: "" |
| maxfiles | Uploads will be limited to this number of files. If left blank, there is no limit. Default value: "" |
| enableResume | This parameter allows you to control whether U-Upload allows transfers to be resumed. It can be set to "true", the user will be prompted to resume is possible, "false", the user can not resume, and "auto", U-Upload will resume whenever possible without asking. Default value: "true" |
| appendFilesToURL | If set to true, the files that were uploaded will be appended to the end of the URL specified in the "callurlaftertransfer" parameter. The parameter name will be specified by the "filesTransferredParameter" parameter. For example: If you uploaded the files c:\temp\file1.txt and c:\autoexec.bat and your "callurlaftertransfer" parameter was set to "http://www.unlimitedftp.ca/processfiles.jsp" the the following URL will be called after the transfer is complete: http://www.unlimitedftp.ca/processfiles.jsp?filesTransferred=file1.txt;autoexec.bat Default value: "false" |
| filesTransferredParameter | Specifies the name of the parameter used to pass the list of uploaded files to the "callurlaftertransfer" parameter. Default value: "filesTransferred" |
| showsizeanddate | If set to true, the browse dialog will display the file name including the file size and date attribute. If set to false, only the file name will be displayed. Default value: "false" |
| showservername | If set to false, the remote server domain or IP will not be shown in the connecting dialog. Default value: "true" |
| delimiter | This will be the delimiter for the files listed in the text field. Note that setting this parameter also effects the "fileset" parameter. The list of files specified in "fileset" must be delimited by the value specified in the "delimiter" parameter. Default value: ";" |
| removeaccentsandquotes | If set to true, U-Upload will convert accented characters in a filename to non-accented characters. Default value: "false" |
| removespaces | If set to true, U-Upload will replace all spaces in a filename with an underscore character. Default value: "false" |
| browsenative | If set to true, U-Upload will use a native file dialog, rather than the built in file dialog. This allows you to take advantage of the features native dialogs offer, thumbnails for example. However, due to a Java limitation, it will limit you to selecting one file at a time. NOTE: The "showsizeanddate" parameter is automatically disabled if you set "browsenative" to "true" Default value: "false" |
| useTempName | This parameter is used in conjunction with the "useSerfo". When uploading via UnlimitedFTP.Secure, files are broken into small pieces and uploaded and reassembled on the FTP server using the APPE command. Setting this parameter to "true" will cause the uploaded file to be stored under a temporary name until the upload is complete. At that time it is renamed to the original filename. Default value: "false" |
| totalProgress | U-Upload can show the progress of an entire upload, or progress of individual files. By default, the progress of the entire upload is shown. Default value: "true" |
| siteCommandStor | Setting this parameter allows you to execute a custom SITE command after each file is uploaded. This parameter also accepts wildcards which are automatically replaced by the full path of the file that was just uploaded. Example: var siteCommandStor = "processfile *"; This would result in U-Upload sending the following command to your FTP server after each file is uploaded: SITE processfile /pathtofile/filename.txt Default value: "" |
| postURL | If set to a valid URL, U-Upload will do an HTTP POST to the specified URL with a list of all uploaded files delimited by the delimiter as set. The URL will also contain information regarding base directory and total size of all files uploaded to the FTP server. The parameters will be called "f", "baseDir", and "totalSize" respectively. Default value: "" |
| removePathsFromPostData | If set to true, U-Upload will strip path information from the file data that is sent to the URL specified in the postURL parameter. Default value: "false" |
| sendLogsToURL | If set to a valid URL, U-Upload will do an HTTP POST to the specified URL with a log of the FTP session when the applet is terminated (browser closed, or page unloaded), or when the page is redirected. The POST will contain a parameter called "logs", and the value will be the FTP session log. Default value: "" |
| checkSize | If set to "true", the file size will be verified after upload is complete. This relies on the SIZE command being implemeneted on the FTP server. If you see errors with this feature enabled, your FTP server likely doesn't support the SIZE command. Default value: "false" |
These parameters control the various visual elements of the U-Upload interface. They allow you to blend the color scheme of U-Upload with that of your existing web page.
| UI related settings | |
|---|---|
| language | U-Upload allows you to customize the language of the text on the interface. To do this, edit the contents of "lang_en.txt" which is included in the download archive. Save the file with an appropriate language code. Example for French might be "lang_fr.txt". This parameter should then be set to "fr". Default value: "en" |
| bgcolor | Allows you to change the background of the applet using standard RGB (Red, Green, Blue) values separated by a comma. For example white = 255,255,255 Default value: "255,255,255" |
| textwidth | Width of the text field in columns. Setting width to 0 (zero) hides text fields. Default value: "15" |
| width | Width of the U-Upload applet. Default value: "500" |
| height | Height of the U-Upload applet. Default value: "150" |
These parameters allow you to define your own error pages for different types of errors that can occur when a user attempts to load U-Upload.
| Customizable Error Pages | |
|---|---|
| errNavWin | This error page will be called when the user is running Windows and their Netscape version is not sufficient to run U-Upload. Default value: "" |
| errIEWin | This error page will be called when the user is running Windows and their Internet Explorer version is not sufficient to run U-Upload. Default value: "" |
| errIEWinVM | This error page will be called when the user is running Windows with Internet Explorer and the Microsoft VM for Java is not sufficient to run U-Upload. Default value: "" |
| errNavUnix | This error page will be called when the user is running Unix and their Netscape version is not sufficient to run U-Upload. Default value: "" |
| errIEMac | This error page will be called when the user is running Mac OS and their Internet Explorer version is not sufficient to run U-Upload. Default value: "" |
| errNavMac | This error page will be called when the user is running Mac OS, and their Netscape version is not sufficient to run U-Upload. Default value: "" |
| errOperaWin | This error page will be called when the user is running Opera browser and the version is not sufficient to run U-Upload. Default value: "" |
| rejectPermissionURL | This error page will be called when the user rejects the security certificate or does not grant the permissions required for U-Upload to run. Default value: "" |
| Secure FTP Settings | |
|---|---|
| protocol | U-Upload Secure allows you to choose between four protocols. You can connect via regular FTP, SFTP (SSH2) (explained in Section 5.9), FTPS Implicit, or FTPS Explicit (explained in Section 5.8 ). Default value: "FTP" |
| ftpstype | This parameter applies only if the "protocol" parameter is set to "FTPS". The FTPS protocol has a couple of variations. the first is called Implicit and generally runs on port 990, and the second is Explicit which generally runs on port 21. This is explained in more detail in Section 5.8
Default value: "" |
| securedata | This parameter applies only if the "protocol" parameter is set to "FTPS". When using an Explicit FTP connection, there are a couple of ways to establish the data connection. Implicit will assume all data connections are to be secured, while Explicit will issue a PROT P command to explicitly tell the FTP server it should secure the Data connection. You can also turn off data connection security by setting this value to "NONE". This is explained in more detail in Section 5.8 Default value: "EXPLICIT" |
| authCommand | This parameter applies only if the "protocol" parameter is set to "FTPS". When using an Explicit FTP connection, there are a couple of ways to establish the control connection. You can connect using SSL or TLS. This is explained in more detail in Section 5.8
Default value: "AUTH_TLS" |
U-Upload's language settings allow you to customize the text on the applet. This can be accomplished by modifying the text elements provided in the lang_en.txt file. Alternatively if you wish to provide support for multiple languages you may create a separate language file for each language you wish to support. Using this method you can dynamically load the language file based on the "language" parameter provided to U-Upload.
For example, if you wish to create a language file that contains the text elements for the German language then follow these steps:
Note: If no language parameter is provided then the default lang_en.txt file is used.
If you need to filter files by more than just extension, U-Upload allows you to filter using wildcard expressions as well. U-Upload has a parameter called "exclude" which allows you to list expressions like file*.* or *.doc or even *file*.doc. This allows you to exclude all files that match any of the expressions you list. There is also an "invertexclude" parameter which allows you to only include the files that match the given expressions.
Example 1:
var exclude = "C:\\,temp,file*.txt";
var invertexclude = "true";
In this example, only files that match file*.txt will be displayed in the file list. Note that when you use this feature, you must explicitly list all drives and directories you wish to include.
Example 2:
var exclude = "*.mp3, *.exe, Program Files ";
var invertexclude = "false";
In this example, all files will be shown except MP3s, EXEs, and the Program Files directory.
U-Upload has the ability to resume broken or cancelled transfers. If a transfer is interrupted due to network problems, depending on how you have set the "enableResume" parameter, U-Upload will try to resume the transfer. If you cancel a transfer and wish to resume the transfer at a later time, simply select the file you wish to resume, and click Upload or Download. You will be prompted to resume the transfer if possible. This feature can be controlled with the "waitRetry", "maxRetries", and "enableResume" parameter. See Section 4.1
In some cases, it may be desirable to load the U-Upload applet dynamically using JavaScript or using a server side scripting language such as JSP, PHP or ColdFusion. If this is the case, you may want to move the contents of uupload.js into your dynamic page by cutting and pasting the entire source in between two <script> tags. You can then replace the variable values with values obtained from your dynamic page. Here is an example:
<%
String username = "anonymous" ;
String password = "uftp@unlimitedftp.com" ;
String hostname = "ftp.sun.com" ;
String port = "21" ;
%>
<script>
// Connection related values
var server = " <%= hostname %> " ;
var port = " <%= port %> " ;
var pass = " <%= password %> " ;
var user = " <%= username %> " ;
...
</script>
Further to loading U-Upload dynamically, you may want to fully integrate U-Upload into your web application's workflow. To do this we provide a way to automatically upload an externally generated list of files, and redirect after the upload is complete. This allows you to use your own file selection mechanism, and simply use U-Upload as a means to move the files to your FTP server. There are 4 URLs you can use to redirect after uploads are complete. "callurlaftertransfer" , "transfererrorurl" , "transfercancelurl", "othererrorurl". All of these are described in Section 4.3. The autoupload feature is described in Section 5.5.
U-Upload provides the "autoupload" variable, which enables uploading a list a files passed to the applet via a parameter. It may also be desirable to set the applet's height and width to 0 since the interface will not be used. Here is an example:
var autoupload = "true";
var fileset = "c:\\temp\\file1.exe;c:\\My Documents\\file2.exe";
The autoupload feature is only available when you install a license key. If you have need to use this feature during development, please email us and we will arrange for you to receive a trial key.
U-Upload (Pro and Secure) provides the LiveConnect scripting interface, allowing you to access its functionality from JavaScript.
For an example of the scripting interface in action, see the HTML file "scripting_demo.html", which is included in the applet archive.
The following methods are available for scripting the U-Upload Pro or Secure applet:
| U-Upload Javascript methods | |
|---|---|
| void browse () | Opens the browse window for selecting file(s) and/or directory(s) |
| void upload () | Initiates the upload of the selected files. This function only works in registered versions. |
| void clearFiles () | Clears the group offiles to be transferred |
| void addFileFilter (String filter) | Adds a file filter of form "All files (*.*)" to the File dialog |
| void clearFileFilters () | Removes all of the file filters from the file dialog |
| void addFile (String fullFilePath) | Adds a file to the list of files to be transferred |
| void setUsername (String user) | Sets the username for the desired FTP server |
| void setPassword (String pass) | Sets the password for the desired FTP server |
| void setServer (String server) | Sets the hostname for the desired ftp server |
| void setPort (String port) | Sets the port on which thedesired FTP server is listening |
| String getLog () | Returns a log of all the FTP commands and responses |
| String getFiles () | Return a semi-colon delimited list of the selected files |
| void setZip (String zip) | Accepts "true" or "false", tuns auot-zip on/off |
| void setZipFileName (String filename) | Sets the desired zip file name |
| void setPassive (String passive) | Accepts "true" or "false", togles U-Upload between active and passive mode |
| void setFileDialogTitle (String title) | Sets the title of the Browse dialog |
| void setCallURLAfterTransfer (String URL) | Sets this URL to be called when the transfer is complete |
| void setLocalDir (String ldir) | The initial directory of the Browse dialog |
| void setRemoteDir (String rdir) | This will be the directory where files are stored on the FTP server |
| void setCreateDirectoryOnStartup (String rdir) | This directory will be created on the FTP server |
** For a complete demo of how this interface can be used, see scripting_demo.html **
U-Upload Pro and Secure have the ability to resume broken or cancelled transfers. If a transfer is interrupted due to network problems, U-Upload will automatically try to resume the transfer. If you cancel a transfer and wish to resume the transfer at a later time, simply select the file you wish to resume, and click Upload. You will be prompted to resume the transfer if possible.
FTPS (File Transfer Protocol over SSL) is an extension of FTP. FTPS uses SSL (Secure Socket Layer) to secure the command connection and optionally the data connection of an FTP session. There are a few variations in the evolution of FTPS. Early implementations implicitly encrypt the command and data sockets, while later versions allows you to explicitly tell the server if you want to encrypt the command socket, the data socket or both. Which configuration you use depends on which your server supports. Most newer servers support Explicit FTPS and if that is available, it should be used. Another option U-Upload provides is the ability to choose the encryption version whether it is SSL or TLS. Some older servers may not support TLS, so the authCommand should be set to AUTH_SSL in this case. Here is a sample configuration if you plan to auto-connect to your FTPS server:
// Connection related values
var server = "yourserver.com";
var port = "21";
var user = "username";
var pass = "password";
var autoconnect = "true";
// Secure FTP related settings
var protocol = "FTPS";
var ftpstype = "EXPLICIT";
var securedata = "EXPLICIT";
var authCommand = "AUTH_TLS";
More information on FTPS can be found here.
SFTP (SSH file transfer protocol) is a file transfer implementation similar to FTP (File Transfer Protocol) but that is secured with the SSH (Secure Shell). SFTP actually has nothing to do with FTP as far as the underlying technology and is not an extension of FTP. Instead, it uses a combination of SCP (Secure Copy), and various other commands to simulate an FTP-like client. Most Linux servers come equipped with SFTP capabilities, and add-ons are available for Windows as well.
Connecting to an SFTP server with U-Upload is fairly simple. If you plan to auto-connect, you must configure the following parameters:
// Connection related values
var server = "yourserver.com";
var port = "21";
var user = "username";
var pass = "password";
var autoconnect = "true";
// Secure FTP related settings
var protocol = "SFTP";
var ftpstype = "";
var securedata = "";
var authCommand = "";
Note that the default port for SFTP is port 22 rather than the more familiar FTP connection on port 21.
Acknowledgement - U-Upload Secure uses the open source JSCH library to provide SFTP, and is being used in accordance with the following license.
U-Upload can provide Secure FTP via HTTPS using Unlimi-Tech's proprietary UnlimitedFTP Servlet, which works in conjunction with U-Upload to provide an HTTP(S) tunnel through which all FTP traffic is routed. Communication from the servlet to the applet is not secure, but since it occurs on the server side—typically behind a firewall—it is not exposed to the public. More information can be obtained on UnlimitedFTP Servlet here.
Our support web site is available 24/7 is a great place to get answers: http://support.filecatalyst.com Be sure to search the knowledge base as well as visit the forums (one of the buttons in the header).