Accepting forwards

Hi all,

I am using SWFUpload in a Struts framework web application. I am trying to figure out a good way to enforce some forwarding action to an error report page when I receive an error. Using the usual Struts forwarding system I clearly get the forwarded page back (I checked using an HTTP monitor), but I believe the forward is merely being interpreted as a success (The upload is listed as complete despite the error and no action takes place). What can I do to enforce these forwards? Is it possible to have Struts forward a JSP page that SWFUpload can interpret as some kind of error code and then forward to the report page itself? Thanks for any help.

gyphie's picture

200 OK

Flash interprets a 200 OK response as a success. The server accepted the file and said "OK, I got it, here is some content (aka 200 OK). That's all it knows. The content is then available in the serverData parameter of the uploadSuccess event. You can read and interpret it there and then use JavaScript to redirect the page if needed.

Alright then looking into it

Okay, I'll see if I can manage to get this working with some HTML data I throw at uploadSuccess. Is the serverData paramater available in the flash8 version? I thought I heard somewhere it was 9 only. I am shooting for wider compatibility so I was hoping to avoid use of the flash 9 version. In any case, thank you mighty disembodied head.

gyphie's picture

Flash 9

Flash 8 does not have support for serverData. In Flash Player 9 the only option you have is to return some other HTTP status code

According to Adobe Flash 9 has a penetration of 97.7% and the latest Flash Player 9 has 81.7% penetration.

gyphie's picture

P.S.

The next major version of SWFUpload (v3) will drop Flash 8 support.