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

Notification

Icon
Error

Options
Go to last post Go to first unread
stevewood  
#1 Posted : Wednesday, February 13, 2008 9:31:15 AM(UTC)
stevewood

Rank: Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 21

I have an upload script that works perfectly with IE7, but has an error on FireFox using Java. The script cannot find sourceFile_1. This is with version 5.0.30.0.
Andrew  
#2 Posted : Wednesday, February 13, 2008 4:38:36 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
Sounds strange. I have one clue - param names in Firefox may be case sensitive - but I need to look into your code. Could you post a snippet with params?
stevewood  
#3 Posted : Wednesday, February 13, 2008 9:05:12 PM(UTC)
stevewood

Rank: Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 21

Thank you. Here is the entire script. You won't recognize the syntax because it is using Xbasic from Alpha Software. But the below script works fine with IE, but produces the following error with Java:

Error Script /upload.a5w Line 18

tbl.Filename = SourceFile_1.filename Not Found

SourceFile_1 Not Found

Line 18 is actually 16 lines down in the code below, including the blank lines.

The URL for the site (if that helps) is http://photo.alphatogohost.com.

Code:
strImagePath = "[PathAlias.Image_Path]\\"+ session.__protected__album
strThumbsPath = "thumbs\\"+ session.__protected__album

if file.exists(strImagePath) = .f.
	file.dir_create(strImagePath)
end if
if file.exists(strThumbsPath) = .f.
	file.dir_create(strThumbsPath)
end if

dim tbl as p
tbl=table.open("[PathAlias.ADB_Path]\photoimage")
	tbl.enter_begin()
		tbl.User_id 	= session.__protected__ulink
		tbl.Albumid 	= session.__protected__album
		tbl.Filename 	= SourceFile_1.filename
	tbl.enter_end()
tbl.close()	

'"-BLOBS-----------------------------------"
file.from_blob(strImagePath+"\\"+ SourceFile_1.filename,SourceFile_1.data)
file.from_blob(strThumbsPath+"\\t1_"+FILE.FILENAME_PARSE(Thumbnail1_1.filename,"n"),Thumbnail1_1.data)
file.from_blob(strThumbsPath+"\\t2_"+FILE.FILENAME_PARSE(Thumbnail2_1.filename,"n"),Thumbnail2_1.data)
stevewood  
#4 Posted : Wednesday, February 13, 2008 9:09:08 PM(UTC)
stevewood

Rank: Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 21

I should mention that, although I have purchased the ImageUploader license, I have not registered it to this web address yet.
stevewood  
#5 Posted : Thursday, February 14, 2008 2:47:19 PM(UTC)
stevewood

Rank: Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 21

Doing a little experiment, getting the raw POST payload, I see that both IE and FF do get the same POST variables. I put the POST reference for just the SourceFile_1 element for each at the bottom of this message. They look the same.

But a request such as myvar=SourceFile_1.filename is successful on IE and fails on FF, with error SourceFile_1 not found. And I get the same error with Java no matter what variable I am trying to process (e.g.: myvar=FileCount, myvar=Thumbnail1_1, etc.). So although my client is sending the same POST variables, the Java applet is not parsing the variables, at least not in the same manner as ActiveX.

The only difference in the header of the POST file is the User-Agent line, as follows:

FF: User-Agent: Aurigma Image Uploader JE

IE: User-Agent: Image Uploader

---------------

Portion of HTTP POST payload:

FF (Java):

Jpeg

--ptK_t_yVOIPqDk8tCS7N3ea-HyKE23RrD68k

Content-Disposition: form-data; name="SourceFile_1"; filename="myphoto.jpg"

Content-Type: image/jpeg; charset=UTF-8; Content-Transfer-Encoding: binary

IE (ActiveX):

Jpeg

-------------------------55a55e777000

Content-Disposition: form-data; name="SourceFile_1"; filename="myphoto.jpg"

Content-Type: image/jpeg; charset=utf-8; Content-Transfer-Encoding: binary

stevewood  
#6 Posted : Thursday, February 14, 2008 5:02:34 PM(UTC)
stevewood

Rank: Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 21

And to add one more thing...

...this code of mine worked perfectly with your version 4.5 Dual.

I just updated to the latest 5.0.40.0 and the problem still persists.

stevewood  
#7 Posted : Friday, February 15, 2008 9:36:02 AM(UTC)
stevewood

Rank: Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 21

RESOLVED.

I added this to the top of the page the client views to open the client-side java applet.

<META http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">

Users browsing this topic
Guest
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.