Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JUPLOAD Utility

22 views
Skip to first unread message

MirzaIncDev

unread,
Feb 15, 2005, 5:14:17 PM2/15/05
to
Let me begin by stating that I am new to Java ...

http://www.jupload.com - Free - Excellent - Java Applet - I cannot get any CF
example for this to work. I have implemented it on a development server, it
sees my files, and even gives me a progress bar as if its uploading -

I cannot see any form variables or anything...No uploaded files.. It doesnt
even submit the form...is this required?

PLEASE HELP! Thank you in advance

My code:

<html>

<head>
<title>JUpload - multiple file upload with resuming</title>
</head>

<body>
<h2>JUpload Simple Demo</h2>
<cfif isdefined("form.FieldNames")>
<cfloop index="idx" list="#Form.FieldNames#">

<cfif find("UPLOADEDFILES",idx,0) GT 0 and find("ABSOLUTEPATH\",idx,0) LTE 0>
<cffile action="UPLOAD" filefield="#idx#"
destination="E:\websites\projects\uploadviajava\" nameconflict="MAKEUNIQUE">
</cfif>

</cfloop>
</cfif>
<hr>
<p align="center">

<br>
<cfoutput>
<!---
<applet
code="JUploadPlugin_ImagePreview"
archive="jars/jupload.jar"
width="300"
height="300"
mayscript
name="JUploadPlugin_ImagePreview"
alt="JUpload Plugin: Image preview">
</applet>--->
<form name="JUpload">

</form>


<applet
code="JUpload.startup"
archive="jars/jupload.jar"
width="500"
height="300"
mayscript="mayscript"
name="JUpload"
alt="Upload Application">
<!-- Java Plug-In Options -->
<param name="progressbar" value="true">
<param name="tagName" value="upfiles">
<param name="RealTimeResponse" value="true">
<param name="actionURL" value="upload.cfm">
<param name="imageFileFilter" value="true">
<param name="completeURL" value="">
<param name="usePUTMethod" value="false">
<param name="debug" value="true">
<!---<param name="boxmessage" value="Loading Applet ...">
Target links

<param name="image" value="">
<param name="tagName" value="FieldNames">
<param name="checkResponse" value="true">
<param name="showSuccessDialog" value="true">
<param name="imageFileFilter" value="true">
<param name="hideShowAll" value="true">
<param name="RealTimeResponse" value="true">
<param name="successDialogMessage" value="Your files have been uploaded.">--->
<!--- <!PARAM NAME="maxTotalRequestSize" VALUE="4">--->
<!--- IF YOU HAVE PROBLEMS, CHANGE THIS TO TRUE BEFORE CONTACTING SUPPORT
<param name="debug" value="true">--->
<!param name="dimensionFilter" value="((width>=640 and width<=1024) and
(height>=480 and height <= 768)) or ((width>=480 and width<=768) and
(height>=640 and height <= 1024)) or (width=-1 and height=-1)">
</applet>
<applet
code="JUploadPlugin_ImagePreview"
archive="jars/jupload.jar"
width="200"
height="200"
mayscript
name="JUploadPlugin_ImagePreview"
alt="JUpload Plugin: Image preview">
</applet>
</cfoutput>
</p>
<hr>

<p>
<hr>


</body>
</html>


PaulH

unread,
Feb 17, 2005, 2:17:09 AM2/17/05
to
might try:


<param name="fixJakartaBug" VALUE="false">

MirzaIncDev

unread,
Feb 17, 2005, 9:52:41 AM2/17/05
to
No luck...

Is there any way I can somehow communicate to the applet as an object or
something? If so maybe there is some kind of array or somethng that it is
passing to the page on the server where I can get the files at the server...
but how can the server be accepting the files without configuration other than
this applet?


PaulH

unread,
Feb 17, 2005, 1:26:40 PM2/17/05
to
turning that off produced form variables on my box. however the logs showed that the applet wasn't producing valid upload files as far as mx was concerned.

MirzaIncDev

unread,
Feb 23, 2005, 8:27:39 AM2/23/05
to
Hey,

Sorry - I got pulled into another project for a few days... I am still struggling with this applicaiton... Is there any way you could post your code?

Thank you very much!

PaulH

unread,
Feb 24, 2005, 6:18:58 AM2/24/05
to
nothing special except what i already noted.

<!--- index.cfm --->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>

<body>

<form action="uploadcfm.cfm" method="post">
<applet
code="JUpload.startup"
archive="/jupload/jupload.jar"


width="500"
height="300"
mayscript="mayscript"
name="JUpload">

<param name="progressbar" value="true">

<param name="boxmessage" value="Loading JUpload Applet ...">
<param name="debug" VALUE="true">


<param name="fixJakartaBug" VALUE="false">

<param name="actionURL"
value="http://surin/jupload/examples/coldfusion/uploadcfm.cfm">
<param name="checkResponse" VALUE="false">
</applet>
</form>
</body>
</html>


<!--- uploadcfm.cfm --->
<cfsavecontent variable="x">
<cfdump var="#form#">
</cfsavecontent>

<cffile action="WRITE" file="e:\temp\junk\jupload.htm" output="#x#"
addnewline="Yes" fixnewline="Yes">

<cfoutput>


<cfloop index="idx" list="#Form.FieldNames#">

<cfif findNoCase("UPLOADEDFILES0",idx,0)>
<cffile action="UPLOAD" filefield="#idx#" destination="E:\temp\junk\"
nameconflict="MAKEUNIQUE">
#idx#<br>
</cfif>
</cfloop>
#x#
</cfoutput>

Doug Cain

unread,
Mar 9, 2005, 7:06:26 AM3/9/05
to
I have just been trying this and it seems the form field required is the
UPLOADEDFILES on its own as CF J2EE uploads the file to a temp directory within
the CF root. A dump of the form variable looks like this: FIELDNAMES
UPLOADEDFILES0_ABSOLUTEPATH,UPLOADEDFILES0_RELATIVEPATH,UPLOADEDFILES0_LASTMODI
FIED,UPLOADEDFILES0_MD5HASH,UPLOADEDFILES0_LASTMODIFIED,UPLOADEDFILES0
UPLOADEDFILES0
D:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\neotmp57692.tmp
UPLOADEDFILES0_ABSOLUTEPATH C:\Documents and Settings\doug\My
Documents\fonts.gif UPLOADEDFILES0_LASTMODIFIED 1101730132311,1101730132311
UPLOADEDFILES0_MD5HASH 1604989c02c6b4d20c0688b13647bb87
UPLOADEDFILES0_RELATIVEPATH fonts.gif The code below seems to work fine for
uploadcfm.cfm (obviously the loop code needs to be cleverer to handle multiple
files)

<cfloop index="idx" list="#Form.FieldNames#">

<cfif idx is "UPLOADEDFILES0">


<cffile action="UPLOAD" filefield="#idx#"

destination="D:\home\test\jupload\uploaded\" nameconflict="MAKEUNIQUE">
<cfoutput>
Uploaded - #idx#<br>
</cfoutput>
</cfif>
</cfloop>

PaulH

unread,
Mar 10, 2005, 6:22:23 AM3/10/05
to
you're right. when i tried that cf kept throwing errors, i guess i wasn't being
selective enough in the form fields.

<cfoutput>


<cfloop index="idx" list="#Form.FieldNames#">

<cfif findNocase("UPLOADEDFILES",idx,1) AND NOT findNocase("_",idx,1)>
<cffile action="UPLOAD" filefield="#idx#" destination="#destination#"

0 new messages