Got it working. The issue was the cookies not being passed in with the post from the browser. The auth that sits on top of my handler script was not getting the username and customer_id passed into it and was correctly redirecting the request to the login script, and hence the 302 HTTP error (redirect). For whatever reason, FF2/Mac uploads using the FileReference object appear to somehow circumvent/ ignore the cookies in the browser and post without them. I got around this by changing the swf to use ExternalInterface to grab the cookie values from js in the embedding HTML page and then pass those as values in the post during the upload process. Seems to work fine. One other thing to note is that when running a swf using filereference for uploads in a browser that you have proxied, the proxy will seemingly be ignored by the swf, and the post is made outside the proxy. Very strange, but replicable behavior. That one I have not solved yet.

Josh

On Mar 20, 2007, at 8:06 AM, flashcoders- [EMAIL PROTECTED] wrote:

Date: Tue, 20 Mar 2007 11:10:25 +0100
From: "Emir Krkic" <[EMAIL PROTECTED]>
Subject: Re: [Flashcoders] http error 302 on upload with filereference
        object
To: flashcoders@chattyfig.figleaf.com
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I had nightmares with this. I never made it work on Mac with Apache server
as upload server with PHP 4. It is some combination there which is not
alright. I tryied the same php script and upload with html page and that worked. But not with FLASH. It looked like it was uploading and it came almost to the end and then I recived the error. I tryied with all those tricks, like return an empty string, change the config files on the server side etc... Everything that I found on the web. Finally I made an HTML page for the Mac users that uploaded the file thru a form and then I past the
filename to the flash with swf object class.
If you find a solution I would love to hear it!

On 3/16/07, Smeets, Ben <[EMAIL PROTECTED]> wrote:

Had similar woes ;)

The important thing is 1) Firefox does things differently 2) Mac does
things differently. If both are true in your situation, the one thing
that pops in mind is the fact that your server upload handling script,
always needs to return something for the upload to succeed. E.g.
normally your upload handler doesn't return anything, to make it work in mac environments, make it return an empty string after it has processed
the upload.

Ben

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Josh
Ettwein
Sent: vrijdag 16 maart 2007 0:50
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] http error 302 on upload with filereference
object

Anyone get these before? my entire app works to one remote php script on
one server and then when moving it to a production app environment
(which is Perl) I don't even see a request showing up in the apache
access logs. The filereference object is reporting back an http error of type 302. I'm wondering if anyone has experienced file upload woes like
this...



--------------------------------------------------------------
Josh Ettwein | Sr. Software Engineer | Eyespot.com | www.eyespot.com





_______________________________________________
Flashcoders@chattyfig.figleaf.com
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