JFile provides limited support for file transfers from a Mac client system running IE 5.0 or above and for Windows/Unix/Linux running Netscape 6.x (JFile will not work with Mac/Netscape).
The only transfer method available with Mac/IE is sockets. URLConnection does not work properly with Netscape 6.x. Therefore, JFile on a Mac or Netscape 6.x,
MacOS and Netscape 6.x do not support JSObject. Therefore, JFile on these client systems,
When uploading from a Mac+IE or Win/Unix/Linux+Netscape 6.x client system, the connection method will automatically be set to sockets. You cannot use the transfer methods WinInet and URLConnection with these client systems.
See also Transfer Methods.
If you wish to display the result of an upload from these client systems, you must set the NoJSObjectSupportPostURL parameter.
For uploads from client systems which support the JSObject (such as Windows/Unix/Linux and IE or Netscape 4.7x), the response from the server is received by the applet and then passed to the JSObject which outputs the response. However, Mac systems, Netscape 6.x, and Sun's JVM do not support the JSObject. Although the applet has received the response, it does not have an inherent way to display it. Therefore, you must provide a separate upload processing page for these uploads which, rather than outputting html to the browser, writes the response to a file in a virtual directory on the server. This processing script then sends a 302 redirection to the generated file's URL (using "response.redirect"). The applet is then able to get the file containing the response and display it.
If you wish to support users with various operating systems and browsers, you should set both the PostURL and the NoJSObjectSupportPostURL parameters. If the client system supports JSObjects, only PostURL will be used. If the client system does not support JSObjects, and the NoJSObjectSupportURL is not set or is set incorrectly, PostURL will be used and no response will be displayed.
Note: The response file which is dynamically generated on the server will not be automatically deleted. It is recommended that you include the date/time in the filename and create your own process for periodically cleaning out these files. (Our sample alternative upload processing page, "formrespAlt.asp" in JFile's Samples\Upload\BrowserNeutral directory provides an example of how to write the response file and name it with a timestamp.)
Macs (and certain other platforms) can upload files with names which may contain certain characters (such as "\", "/", ">", "*") which are not allowed for Windows filenames. This can cause problems when uploading to a Windows server. Therefore, JFile will, by default, remove these forbidden characters and replace them by "_" or by "_-_" for the "%2f" character ("/" or "|") to keep the same name length.
These modifications will also apply to zip transfers.
If you wish to prevent the original filenames from being modified, set the RemoveWinForbiddenChars parameter to "0".
In order to run JFile on a Mac system, the jar file which has been signed for use on a Mac must be referenced in the applet tag. You can find this jar file in the MAC_JAR directory in the JFile installation folder.
<!-- Javascript script detects the browser and generates the appropriate applet tag. If the client is Mac/IE, we set the applet's codebase to '/JFileScripts/MAC_JAR', the directory containing the Mac/IE version of filetransfer.jar. If the client is NOT Mac/IE, we set the codebase to '/JFileScripts', the directory that contains the non-Mac filetranfer.jar and filetransfer.cab. --> <SCRIPT LANGUAGE= "JavaScript"> if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") != -1 ) { document.write("<APPLET CODEBASE = '/jfilescripts/MAC_JAR' code= 'softartisans.filetransfer.UploadClient.class'"); document.write("height='250' width='300' archive='Mac_filetransfer.jar' mayscript name= 'fileupload'>"); } else { document.write("<APPLET CODEBASE='/jfilescripts' code='softartisans.filetransfer.UploadClient.class'"); document.write("height='250' width='300' archive='filetransfer.jar' mayscript name= 'fileupload'>"); } </SCRIPT> <!-- The Cabbase parameter specifies the cab file containing the applet for PC/IE clients. --> <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"> <!-- The NoJSObjectSupportPostURL parameter specifies the URL to which the file will be posted if uploaded from a Mac+IE or Windows/Unix/Linux+Netscape 6.x client system. --> <PARAM name="NoJSObjectSupportPostURL" value="http://localhost/jfilescripts/formrespAlt.asp"> <!-- The "UseAppletInBrowser" parameter will embed the applet in the page --> <PARAM name="UseAppletInBrowser" value="1"> <!-- The FileName# parameter specifies a file to transfer. When uploading more than one file, use "FileName1," "FileName2," etc. --> <PARAM name="FileName1" value="c:\boot.ini"> </APPLET>
<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.