Forums

IMPORTANT: We have migrated to new forum engine. Some passwords were reset during migration. If you cannot log in now, try to restore password. If you still cannot login or have any other problems with new forum, please email to support@aurigma.com.
Welcome Guest Search | Active Topics | Members

Java problem - sourceFile_1 not found Options
stevewood
Posted: Wednesday, February 13, 2008 5:31:15 PM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 21
Points: 63
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
Posted: Thursday, February 14, 2008 12:38:36 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 703
Points: 90
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?

Sincerely yours,
Andrew Simontsev from Aurigma Team
stevewood
Posted: Thursday, February 14, 2008 5:05:12 AM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 21
Points: 63
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
Posted: Thursday, February 14, 2008 5:09:08 AM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 21
Points: 63
I should mention that, although I have purchased the ImageUploader license, I have not registered it to this web address yet.
stevewood
Posted: Thursday, February 14, 2008 10:47:19 PM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 21
Points: 63
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
Posted: Friday, February 15, 2008 1:02:34 AM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 21
Points: 63
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
Posted: Friday, February 15, 2008 5:36:02 PM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 21
Points: 63
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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.