Advanced Uploader Example With Additional POST Variables and Server Data Return

This example demonstrates how the YUI Uploader Control can be rendered as a transparent layer on top of your own UI and how custom variables can be added to the upload's POST request. In this example, the server-side script also echoes the POST variables accompanying the upload; we retrieve the data returned by the server and display it to the user.

Note: The YUI Uploader Control requires Flash Player 9.0.45 or higher. The latest version of Flash Player is available at the Adobe Flash Player Download Center.

Note: The YUI Uploader Control requires the uploader.swf Flash file that is distributed as part of the YUI package, in the uploader/assets folder. Copy uploader.swf to your server and set the YAHOO.Uploader.SWFURL variable to its full path.

Note: This example uses a server-side script to accept file uploads. The script used does not open or store the file data sent to it. It also does not store the accompanying POST variables, but it does echo them in the response relayed back to the sender of the request. When trying out the example, do not send any sensitive or private data. Do not exceed a file size of 10 MB.

Set custom values for a couple POST vars:


Data returned by the server: