Download failed: file not found
Posted: Mon Jul 02, 2012 6:28 pm
I have JFileUpload working with FTP, and I had JFileDownload working with FTP as well. But due to a bug in Java 7 and Windows 7, can no longer use FTP for JFileDownload. Having trouble getting the download to work with HTTP. Keep getting the file not found error message. Have played with tons of different parameter settings. Need some help. Here's my JS:
Code: Select all
<!--
var _info = navigator.userAgent;
var _ns = false;
var _ns6 = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
if (_info.indexOf("Opera") > 0) _ie = false;
var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
if (_ie == true) {
document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="480" HEIGHT="110" NAME="fileupload" codebase="http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0">');
}
else if (_ns == true && _ns6 == false) {
// BEGIN: Update parameters below for NETSCAPE 3.x and 4.x support.
document.write('<EMBED ');
document.write('type="application/x-java-applet;version=1.4" ');
document.write('CODE="jfileupload.upload.client.MApplet.class" ');
document.write('JAVA_CODEBASE="./" ');
document.write('ARCHIVE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/download.jar" ');
document.write('NAME="fileupload" ');
document.write('WIDTH="480" ');
document.write('HEIGHT="110" ');
document.write('url="http://shows.tourbusradio.com/process.php" ');
document.write('item1="Sunset_1.jpg" ');
document.write('param2="relativefilename" ');
document.write('value2="true" ');
document.write('param3="account" ');
document.write('value3="showfiles" ');
document.write('folderdepth="-1" ');
document.write('encoding="ISO-8859-1" ');
document.write('transferui="jfileupload.download.ui.DownloadTransferUI" ');
document.write('resources="i18n_bar" ');
document.write('transferuiresources="i18n_pane" ');
document.write('mode="jfileupload.download.http.HTTPDownloadTransfer" ');
document.write('scriptable=true ');
document.write('regfile="license.oxw" ');
document.write('transferuiparam1="regfile" ');
document.write('transferuivalue1="download.oxw" ');
document.writeln('pluginspage="http://java.sun.com/products/plugin/index.html#download"><NOEMBED>');
// END
}
else {
document.writeln('<APPLET CODE="jfileupload.upload.client.MApplet.class" JAVA_CODEBASE="./" ARCHIVE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/download.jar" WIDTH="480" HEIGHT="110" NAME="fileupload">');
}
// BEGIN: Update parameters below for INTERNET EXPLORER, FIREFOX, SAFARI, OPERA, MOZILLA, NETSCAPE 6+ support.
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/download.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="http://shows.tourbusradio.com/process.php">');
document.writeln('<PARAM NAME="item1" VALUE="Sunset_1.jpg">');
document.writeln('<PARAM NAME="param2" VALUE="relativefilename">');
document.writeln('<PARAM NAME="value2" VALUE="true">');
document.writeln('<PARAM NAME="folderdepth" VALUE="-1">');
document.writeln('<PARAM NAME="param3" VALUE="account">');
document.writeln('<PARAM NAME="value3" VALUE="showfiles">');
document.writeln('<PARAM NAME="encoding" VALUE="ISO-8859-1">');
document.writeln('<PARAM NAME="transferui" VALUE="jfileupload.download.ui.DownloadTransferUI">');
document.writeln('<PARAM NAME="resources" VALUE="i18n_bar">');
document.writeln('<PARAM NAME="transferuiresources" VALUE="i18n_pane">');
document.writeln('<PARAM NAME="transferuiparam1" VALUE="regfile">');
document.writeln('<PARAM NAME="transferuivalue1" VALUE="download.oxw">');
document.writeln('<PARAM NAME="regfile" VALUE="license.oxw">');
document.writeln('<PARAM NAME="mode" VALUE="jfileupload.download.http.HTTPDownloadTransfer">');
// END
if (_ie == true) {
document.writeln('</OBJECT>');
}
else if (_ns == true && _ns6 == false) {
document.writeln('</NOEMBED></EMBED>');
}
else {
document.writeln('</APPLET>');
}
//-->