I recently ran in to the need to send additional data to my server (and get back results) outside of a file-upload request, but on the same page. The simplest way seemed to be to exchange authentication and some other information via flash and then upload files. As I was already using SWFUploader, I decided to add this capability on to the code. In case anyone is interested, I submitting a patch (unified diff format) against the 2.1.0 beta 2 codebase. I am only using the Flash 9 version, so that's all I have; however if it would get the code considered for addition to a future release of SWFUpload I can implement a Flash 8 version. Please consider that the following code as being released under MIT license, same as SWFUpload.
How to use.
Opps, got carried away, you use the updated code by calling doGet( requestParams, settings ) or doPost(requestParams, settings ), the only 'required' setting is requestId which is passed to your callback to allow tracking by id.
swfu.doGet( { x: 1, y: 2, message: "Hello" } , { requestId: 7, useGlobalParams: false, url: 'server_url.php' } );
I introduce 2 new handlers which should be configured in the initial settings object.
httpRequest_complete_handler(requestId, data);
and
httpRequest_error_handler(requestId, errorId, errorMsg);