Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
gigaboy  
#1 Posted : Friday, April 28, 2006 3:31:06 AM(UTC)
gigaboy

Rank: Member

Groups: Member
Joined: 4/27/2006(UTC)
Posts: 4

(Java Version): I can't seem to get the FORM fields to post at all to the action page (the java console states that the FORM.sourceFile var does not exist, even when I test one small image. (in the cffile action="upload"). I've tried to do a <cfdump var="#form#> with nothing else on the action page with no luck (still throws an error stating the var is unknown). Do I need to pass a session var to maintain session? What am I doing wrong? == The code for the IU:
Code:
	<script language="javascript" type="text/javascript">
		function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText) {
			if (Status=="COMPLETE") {
			// When upload is finished, we are redirecting to the PictureGallery.cfm page
			window.location = '#SESSION.mfu.completeURL#';  
			}
		} 
		
		var iu = new ImageUploaderWriter("ImageUploader", 720, 450);
		iu.activeXControlEnabled = false;
		iu.javaAppletEnabled = true;
		 
		/*
		var imageUploader1 = getImageUploader("ImageUploader1");
		
		ImageUploaderID.setUploadView(ImageUploaderID.getFolderView()); 
		*/
		
		//For Java applet we specify only directory with JAR files
		iu.javaAppletCodeBase = "./";
		iu.javaAppletCached = true; 
		iu.javaAppletVersion = "1.1.81.0"; 
		
		iu.addParam("LicenseKey", "1234-1234-1234-1234"); 
		
		// Layout Functions 
		iu.addParam("Layout","ThreePanes"); 
		iu.addParam("ShowUploadListButtons", "true"); 
		
		// Behaviors 
		iu.addParam("SignatureFilter", "All"); 
		iu.addParam("MaxImageWidth", "0"); 
		iu.addParam("MaxImageHeight", "0"); 
		iu.addParam("MinImageWidth", "0"); 
		iu.addParam("MinImageHeight", "0"); 
	
		// Asset Manipulation
		iu.addParam("FileMask", "#SESSION.mfu.fileExtensions#");  
		iu.addParam("PreviewThumbnailSize", "120"); 
		iu.addParam("EnableFileViewer", "true");
		iu.addParam("UploadSourceFile", "true");  // Original File Upload, goes to the "original" folder 
		iu.addParam("EnableRotate", "true");  // Only rotates the thumbnails, not the original 
		iu.addParam("EditDescriptionText", "Edit photo caption..."); 
			
		// Processing 
		iu.addParam("ShowDebugWindow", "True"); 
		// iu.addParam("AdditionalFormName", "Form1"); 
		iu.addParam("Action", "http://admin.mysite.com/cf-inf/cfMultiFileUpload/fileProcessor.cfm"); 
		iu.addParam("Timeout", "3600000"); 
		iu.addEventListener("InitComplete", "ImageUploader_InitComplete");
		iu.addEventListener("Progress", "ImageUploader_Progress"); 

		iu.writeHtml();
	</script>
=== The code for the action page:
Code:
<cfloop index = "LoopCount" from = "1" to = #FORM.filecount#> 
   <cffile action="upload" 
    filefield="#FORM.SourceFile#_#LoopCount#" 
    destination="#SESSION.mfu.fullPath#" 
    nameconflict="MakeUnique">  
   
   <cfquery name="insOBJ" datasource="#REQUEST.dsnSQL#" username="#REQUEST.dsnUID#" password="#REQUEST.dsnPWD#">
    INSERT INTO #SESSION.companyInfo.companyTablePrefix#_Photos_List 
     (userID, 
     controlID, 
     imageType, 
     photoType, 
     photoSortOrder, 
     photoCaption, 
     fileURL, 
     fileSubType, 
     fileExt, 
     fileDirectory, 
     fileServerFile, 
     fileSize, 
     photoCreateDate)
    VALUES
     (<cfqueryparam cfsqltype="cf_sql_char" value="#SESSION.auth.userID#">, 
     <cfqueryparam cfsqltype="cf_sql_char" value="#SESSION.mfu.controlID#">, 
     <cfqueryparam cfsqltype="cf_sql_varchar" value="#SESSION.mfu.imageType#">, 
     0, 
     2, 
     <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#FORM.Description#_#LoopCount#">, 
     '#File.ServerDirectory#\#File.ServerFile#', 
     '#File.ContentSubType#', 
     '#File.ServerFileExt#', 
     '#File.ServerDirectory#', 
     '#File.ServerFile#', 
     '#File.FileSize#', 
     <cfqueryparam cfsqltype="cf_sql_timestamp" value="#CreateODBCDateTime(Now())#">)
   </cfquery>
   
  </cfloop>

Edited by user Monday, February 18, 2008 2:34:13 PM(UTC)  | Reason: Not specified

gigaboy  
#2 Posted : Sunday, April 30, 2006 11:08:55 AM(UTC)
gigaboy

Rank: Member

Groups: Member
Joined: 4/27/2006(UTC)
Posts: 4

Some additional information: First, the logic flow is add1.cfm where the java applet resides. This would upload files and pass the FORM information to "fileprocessor.cfm" which uses the scripts aurigma provided in CF (using CFFile) to upload the individual files. Finally, after all files would be posted, then the Java App redirects to add2.cfm. Now, I've removed the java applet and inserted the form HTML logic as described in the docs for testing. In the fileprocessor.cfm, I've removed all code except for a and immediately after the cfdump, The java app page shouldl pass all the html form vars from the form to the fileprocessing.cfm page (as defined in the "action" property. In this clean test scenario, uploading a single file using , all form vars are passed and correctly readable. However, when I reinsert the Java app, and rerun the page, again uploading a single file, the cfdump command and cfabort is skipped (no variables are dumped) and the java app redirects immediatedly to the add2.cfm. There is definitely a problem with this java app if it will not respond correctly. I've have repeatedly checked all the java app settings, etc, rebooted the machine, reread the docs from top to bottom, etc, with no change in results. I've tried both on IE6 and FF1.51 with the same problem. I need a fix for this, otherwise I have to scrap the project. This is a deal breaker.
gigaboy  
#3 Posted : Monday, May 01, 2006 4:34:00 AM(UTC)
gigaboy

Rank: Member

Groups: Member
Joined: 4/27/2006(UTC)
Posts: 4

More info: Apparently, the cfdump var form works inside the java console, but it is not writing out to the fileProcessor.cfm page where I can manipulate the data. BTW: Some help from Aurigma would be nice here. I'm getting pressure from 2 clients to get this working. Also, notice that down in the output is the following line (so what does status 200 mean - I'm on IIS6 with Win 2003, not apache - how does this getResponseAsStream affect the process?): ++++++++++++++++++++++
Code:
Status =[200]
May 1, 2006 3:24:51 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseAsStream instead is recommended.
Here's the console output:
Code:
Java Plug-in 1.5.0_06
Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Administrator.INTRANET
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
ImageUploader version: 1.1.81
Current document URL: http://admin.mysite.com/digitalAssets-v1/add1.cfm?fm=re&controlID=55B10B7C-F8F7-CD0B-A5AAE4918A70B8F1&iType=fp
Reading cookies
Cookies: CFTOKEN=36353bd05177bd28%2DEFEB9D03%2DF77F%2DF796%2D801B1B5F9F309E56; CFID=1229248; CFGLOBALS=urltoken%3DCFID%23%3D1119204%26CFTOKEN%23%3D6b6f0c5cf16d182f%2D32354849%2DB8CC%2D6652%2D9A982CD5598A1F7D%26jsessionid%23%3De63091e6f433153f3711%23lastvisit%3D%7Bts%20%272006%2D03%2D26%2018%3A50%3A07%27%7D%23timecreated%3D%7Bts%20%272006%2D01%2D07%2019%3A04%3A42%27%7D%23hitcount%3D7216%23cftoken%3D31784090f1696b27%2DA7C21E58%2D91C5%2DADDE%2D8C4D225E009C27EF%23cfid%3D903316%23; bhCookiePerm=1; AreCookiesEnabled=908; JSESSIONID=e630b6db4ca044632627; bhCookieSess=1; bhResults=bhfv=8&bhfx=8.0%20%20r22&bhje=1&bhab=1&bhav=7.00&bhsh=1200&bhsw=1600&bhiw=1101&bhih=881&bhtz=3
Reading referer
Referer: http://admin.mysite.com/digitalAssets-v1/add1.cfm?fm=re&controlID=55B10B7C-F8F7-CD0B-A5AAE4918A70B8F1&iType=fp
Reading additional form content
Processing additional form Form1
Error occurred while processing additional form
java.lang.String
Uploading to http://admin.mysite.com/cf-inf/cfMultiFileUpload/fileProcessor.cfm
Setting HTTP params: Host=admin.mysite.com
Starting upload
Status =[200]
May 1, 2006 3:24:51 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseAsStream instead is recommended.
Upload complete. Result page:

<style>
table.cfdump_wddx,
table.cfdump_xml,
table.cfdump_struct,
table.cfdump_array,
table.cfdump_query,
table.cfdump_cfc,
table.cfdump_object,
table.cfdump_binary,
table.cfdump_udf,
table.cfdump_udfbody,
table.cfdump_udfarguments {
	font-size: xx-small;
	font-family: verdana, arial, helvetica, sans-serif;
	cell-spacing: 2px;
}

table.cfdump_wddx th,
table.cfdump_xml th,
table.cfdump_struct th,
table.cfdump_array th,
table.cfdump_query th,
table.cfdump_cfc th,
table.cfdump_object th,
table.cfdump_binary th,
table.cfdump_udf th,
table.cfdump_udfbody th,
table.cfdump_udfarguments th {
	text-align: left;
	color: white;
	padding: 5px;
}

table.cfdump_wddx td,
table.cfdump_xml td,
table.cfdump_struct td,
table.cfdump_array td,
table.cfdump_query td,
table.cfdump_cfc td,
table.cfdump_object td,
table.cfdump_binary td,
table.cfdump_udf td,
table.cfdump_udfbody td,
table.cfdump_udfarguments td {
	padding: 3px;
	background-color: #ffffff;
	vertical-align : top;
}

table.cfdump_wddx {
	background-color: #000000;
}
table.cfdump_wddx th.wddx {
	background-color: #444444;
}


table.cfdump_xml {
	background-color: #888888;
}
table.cfdump_xml th.xml {
	background-color: #aaaaaa;
}
table.cfdump_xml td.xml {
	background-color: #dddddd;
}

table.cfdump_struct {
	background-color: #0000cc ;
}
table.cfdump_struct th.struct {
	background-color: #4444cc ;
}
table.cfdump_struct td.struct {
	background-color: #ccddff;
}

table.cfdump_array {
	background-color: #006600 ;
}
table.cfdump_array th.array {
	background-color: #009900 ;
}
table.cfdump_array td.array {
	background-color: #ccffcc ;
}

table.cfdump_query {
	background-color: #884488 ;
}
table.cfdump_query th.query {
	background-color: #aa66aa ;
}
table.cfdump_query td.query {
	background-color: #ffddff ;
}


table.cfdump_cfc {
	background-color: #ff0000;
}
table.cfdump_cfc th.cfc{
	background-color: #ff4444;
}
table.cfdump_cfc td.cfc {
	background-color: #ffcccc;
}


table.cfdump_object {
	background-color : #ff0000;
}
table.cfdump_object th.object{
	background-color: #ff4444;
}

table.cfdump_binary {
	background-color : #eebb00;
}
table.cfdump_binary th.binary {
	background-color: #ffcc44;
}
table.cfdump_binary td {
	font-size: x-small;
}
table.cfdump_udf {
	background-color: #aa4400;
}
table.cfdump_udf th.udf {
	background-color: #cc6600;
}
table.cfdump_udfarguments {
	background-color: #dddddd;
	cell-spacing: 3;
}
table.cfdump_udfarguments th {
	background-color: #eeeeee;
	color: #000000;
}

</style>
	 
		<table class="cfdump_struct">
		<tr><th class="struct" colspan="2">FORM - struct</th></tr>
		
			<tr><td class="struct">ANGLE_1</td>
			<td>  0 </td></tr> 
			<tr><td class="struct">DESCRIPTION_1</td>
			<td> [empty string] </td></tr> 
			<tr><td class="struct">FIELDNAMES</td>
			<td> FILECOUNT,PACKAGEINDEX,PACKAGECOUNT,PACKAGEGUID,DESCRIPTION_1,WIDTH_1,HEIGHT_1,ANGLE_1,HORIZONTALRESOLUTION_1,VERTICALRESOLUTION_1,SOURCEFILESIZE_1,SOURCEFILECREATEDDATETIME_1,SOURCEFILELASTMODIFIEDDATETIME_1,SOURCEFILECREATEDDATETIMELOCAL_1,SOURCEFILELASTMODIFIEDDATETIMELOCAL_1,FILENAME_1,SOURCEFILE_1 </td></tr> 
			<tr><td class="struct">FILECOUNT</td>
			<td> 1 </td></tr> 
			<tr><td class="struct">FILENAME_1</td>
			<td> C:\Documents and Settings\Administrator.INTRANET\My Documents\My Pictures\0220_model1.jpg </td></tr> 
			<tr><td class="struct">HEIGHT_1</td>
			<td> 163 </td></tr> 
			<tr><td class="struct">HORIZONTALRESOLUTION_1</td>
			<td> -1 </td></tr> 
			<tr><td class="struct">PACKAGECOUNT</td>
			<td> 1 </td></tr> 
			<tr><td class="struct">PACKAGEGUID</td>
			<td> {66DDS214-10E4-8E3B-DA47-0433A4324BS1} </td></tr> 
			<tr><td class="struct">PACKAGEINDEX</td>
			<td> 0 </td></tr> 
			<tr><td class="struct">SOURCEFILECREATEDDATETIMELOCAL_1</td>
			<td> 2006:02:23 16:17:29 </td></tr> 
			<tr><td class="struct">SOURCEFILECREATEDDATETIME_1</td>
			<td> 2006:02:23 21:17:29 </td></tr> 
			<tr><td class="struct">SOURCEFILELASTMODIFIEDDATETIMELOCAL_1</td>
			<td> 2006:02:23 16:17:29 </td></tr> 
			<tr><td class="struct">SOURCEFILELASTMODIFIEDDATETIME_1</td>
			<td> 2006:02:23 21:17:29 </td></tr> 
			<tr><td class="struct">SOURCEFILESIZE_1</td>
			<td> 7564 </td></tr> 
			<tr><td class="struct">SOURCEFILE_1</td>
			<td> C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp7426.tmp </td></tr> 
			<tr><td class="struct">VERTICALRESOLUTION_1</td>
			<td> -1 </td></tr> 
			<tr><td class="struct">WIDTH_1</td>
			<td> 166 </td></tr> 
		</table>

Edited by user Thursday, December 20, 2007 4:42:24 PM(UTC)  | Reason: Not specified

Alex Makhov  
#4 Posted : Monday, May 01, 2006 5:14:07 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello, As I see the reason of the problem is in additional form fields processing. Here is the part of your Java console dump:
Quote:
Processing additional form Form1 Error occurred while processing additional form java.lang.String
We will check our form processing code, but now you could try to try to check it on your side. But I need your page source code. Show the code of the page where you host Image Uploader and your Form1, please. We will send you the information about the fixed version immediately.
Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
gigaboy  
#5 Posted : Tuesday, May 02, 2006 9:59:48 PM(UTC)
gigaboy

Rank: Member

Groups: Member
Joined: 4/27/2006(UTC)
Posts: 4

Please send me your email address to mark@markleder.com - I have a zip file ready for you of all contents.
Alex Makhov  
#6 Posted : Wednesday, May 03, 2006 1:42:01 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello, I have just sent you a message.
Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.