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

Notification

Icon
Error

Options
Go to last post Go to first unread
stevepiercy  
#1 Posted : Tuesday, November 13, 2007 2:40:30 PM(UTC)
stevepiercy

Rank: Member

Groups: Member
Joined: 11/13/2007(UTC)
Posts: 16

I am not able to transmit data from Image Uploader to my server.

I read this helpful page:

http://www.aurigma.com/d...itionalDatawithFiles.htm

and tried all three options:
Additional HTML Form
The AddField Method
GET Requests
and only the third option works.

* Image Uploader version
Image Uploader SDK (evaluation version, ZIP archive)
Date: 8/27/2007
Version: 4.5.50.0

* Which OS were you using, when the problem occurred?
Mac OS X 10.4.10

* Which browser were you using?
Firefox 2.0.0.9 and Safari 2.0.4

* Was the problem reproducible? On which machines you were able to reproduce it?
Yes, consistently. It's running just on localhost for testing.

* Does Image Uploader still work when you try our samples (both online and local)?
The files upload fine, I can see the network traffic go through, but the extra fields data are not getting received by the PHP scripts. What do I need to do to modify the upload.php script so that it receives the additional data? Here is a sample TCP packet on loopback:

Code:

TCP packet from 127.0.0.1:57389 to 127.0.0.1:http(80) (2047 bytes)
ACK PUSH
POST /test/upload.php HTTP/1.1
Cookie: 
Referer: http://localhost/test/upload_form.php
Cache-Control: no-cache
Connection: Keep-Alive
Accept: */*
Accept-Encoding: text/html
User-Agent: Aurigma Image Uploader JE
Host: localhost
Content-Length: 13919
Content-Type: multipart/form-data; boundary=Dl84QyCBNwYIrtQxPsMPzMg1ts0UjP

--Dl84QyCBNwYIrtQxPsMPzMg1ts0UjP
Content-Disposition: form-data; name="xyz"
Content-Type: text/plain; charset=UTF-8; Content-Transfer-Encoding: 
8bit

xyz
--Dl84QyCBNwYIrtQxPsMPzMg1ts0UjP
Content-Disposition: form-data; name="FileCount"
Content-Type: text/plain; charset=UTF-8; Content-Transfer-Encoding: 
8bit

Edited by user Wednesday, October 29, 2008 2:04:47 PM(UTC)  | Reason: Not specified

George Ulyanov  
#2 Posted : Wednesday, November 14, 2007 1:43:22 PM(UTC)
George Ulyanov

Rank: Advanced Member

Groups:
Joined: 7/26/2006(UTC)
Posts: 203

Hello,

What is this POST dump? Is this what you have got or what you want to get?

Also please show us Java console.

Edited by user Monday, February 25, 2008 1:09:59 PM(UTC)  | Reason: Not specified

Best regards,
George Ulyanov
stevepiercy  
#3 Posted : Wednesday, November 14, 2007 2:08:25 PM(UTC)
stevepiercy

Rank: Member

Groups: Member
Joined: 11/13/2007(UTC)
Posts: 16

Thanks for responding.

Actually I figured out what I was doing wrong. I named the field incorrectly on the receiving PHP script. Sometimes staring at my own code for too long causes problems.

As a side note, the snippet was just a portion of the total HTTP traffic that occurred when I used Image Uploader to upload files with additional data fields. The monitoring tool I use is Interarchy. It's very useful for troubleshooting stuff where logs and error reporting is insufficient.

The java console on Mac OS X 10.4.10 has this for a typical entry when I upload one file with one additional data field called "xyx". It looks good.

Code:
===== Wednesday, November 14, 2007 9:54:54 PM US/Pacific =====
Reading additional form content
Form element:<text><xyz><abc>
Additional form processing done
Uploading to http://cpa/prescreen/upload.lasso
Setting HTTP params: Host=cpa
Starting upload
Status =[200]
Upload complete. Result page:
abc
EndOf Result page

Edited by user Monday, December 17, 2007 9:37:43 AM(UTC)  | Reason: Not specified

George Ulyanov  
#4 Posted : Wednesday, November 14, 2007 3:09:05 PM(UTC)
George Ulyanov

Rank: Advanced Member

Groups:
Joined: 7/26/2006(UTC)
Posts: 203

Great :)

Edited by user Monday, February 25, 2008 1:10:20 PM(UTC)  | Reason: Not specified

Best regards,
George Ulyanov
James Harvard  
#5 Posted : Wednesday, November 14, 2007 8:52:55 PM(UTC)
James Harvard

Rank: Member

Groups: Member
Joined: 11/14/2007(UTC)
Posts: 1

Sorry, but I think there is a problem here - I am using the same middleware as Steve tried with, and I cannot get the applet to work either.

Your web site says that the applet "uploads the data in the multipart/form-data format (see RFC 1867)" but it looks to me as if the MIME headers are malformed - i.e. the upload does not conform to the RFC specification. It may work with PHP, ASP etc (just as invalid HTML still displays OK in many browsers) but I believe your multipart/form-data implementation is broken, so the request is being parsed incorrectly by my server setup and the upload fails.

An example of a MIME part header from your applet's POST request looks like this:

Code:
--yEQxqmnhP60phiOFHrh1nqL3luyB_GqXXQPS
Content-Disposition: form-data; name="SourceFileSize_1"
Content-Type: text/plain; charset=UTF-8; Content-Transfer-Encoding: 8bit


I believe it should actually look like this, according to the RFC specification:

Code:
--yEQxqmnhP60phiOFHrh1nqL3luyB_GqXXQPS
Content-Disposition: form-data; name="SourceFileSize_1"
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit


Regards,
James Harvard
stevepiercy  
#6 Posted : Thursday, November 15, 2007 12:59:50 AM(UTC)
stevepiercy

Rank: Member

Groups: Member
Joined: 11/13/2007(UTC)
Posts: 16

Also to add to James' post, I tried using both PHP and Lasso for server platforms. Image Uploader works with PHP, but not Lasso. James correctly points out that Image Uploader generates a malformed request, whereas a competitor's java applet generates a well-formed request. It is possible that PHP has a more robust parsing method than Lasso. Nonetheless Image Uploader's request should be well formed.

Thank you for your consideration.
Alex Makhov  
#7 Posted : Sunday, November 18, 2007 4:04:03 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello All,
All talks are about the following field here:

Code:
Content-Transfer-Encoding: 8bit


The sample in RFC1867 says that this field have to be on the third line of the header. We did it in Image Uploader but then our ASP users wrote about the problems on ASP because of this. So "well formed" request did not work wor ASP users. Then we moved this field to the second line and it works almost everywhere.
We could make a special test version with three lines in field header to test if it really works and if so make a special property to allow two or three lines in header specification.
Does anybody interested in it? Please, write me a PM.

Edited by user Monday, December 17, 2007 9:38:11 AM(UTC)  | Reason: Not specified

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.