I dont know if you know about the bug/feature where flash sends two
messages to the server. The first one one is a blank message and the
second on is the real message. Adobe says they did this to make sure
that there is really a server there before sending. But it is totally
non standard.

There are also other differences between the way flash uploads and the
way browsers do. In order to make it work, I had to modify the server
side code. I used the upload code at servlets.com. Its quite good, but
I still had to play with things to get it right.

The bottom line is that flash upload is not very well done. There are
even bugs they knew about between 8 that they didnt fix for 9. So you
just have to think about upload as a custom function and something
where you can't rely on standards.

Regards
Hank

On 9/23/06, Josete Racero <[EMAIL PROTECTED]> wrote:
Hi everybody,

I´m trying to upload an image file using a Flash form. The server script to
copy the file into the server is developed in Java.
The problem is that, when i invoke the upload method (fileUpload.upload(url),
where fileUpload is a FileReference object)
flash ouput says that file was opening (onOpen event is invoked) and that
transfer is completed (onComplete event is invoked).

The problem occurs in the server script:

I've got an error trying to get the MultipartRequest object. The exception
is: java.io.IOException:Malformed line after disposition: Submit Query

I'm printing the request header and i've found this: A normal header should
be like this:

  POST /handler.cfm HTTP/1.1
  Accept: text/*
  Content-Type: multipart/form-data;
  boundary=----------Ij5ae0ae0KM7GI3KM7ei4cH2ei4gL6
  User-Agent: Shockwave Flash
  Host: www.example.com
  Content-Length: 421
  Connection: Keep-Alive
  Cache-Control: no-cache

  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7
  Content-Disposition: form-data; name="Filename"

  MyFile.jpg
  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7
  Content-Disposition: form-data; name="photo"; filename="MyFile.jpg"
  Content-Type: application/octet-stream

  FileDataHere
  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7
  Content-Disposition: form-data; name="Upload"

  Submit Query
  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7--

but the REQUEST HEADER I'M RECEIVING is like this:

  POST /handler.cfm HTTP/1.1
  Accept: text/*
  Content-Type: multipart/form-data;
  boundary=----------Ij5ae0ae0KM7GI3KM7ei4cH2ei4gL6
  User-Agent: Shockwave Flash
  Host: www.example.com
  Content-Length: 421
  Connection: Keep-Alive
  Cache-Control: no-cache

So, the problem is that the header is incomplete. Does anybody know
what could be the cuase? what's happening?

Thank you very much
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to