JavaSonics ListenUp is no longer for sale.
Writing Server Scripts to Receive Uploaded File
ListenUp sends the recorded message to the server as a file using an HTTP POST. The URL for the POST is that specified using the "uploadURL" Applet parameter. You can write your own scripts to receive the uploaded file and integrate it with your own web based application.
Note that any scripting language may be used on the server including PHP, JSP, ASP, Perl, etc. We have provided sample scripts for some languages in the SDK. These can be found in the test folders. Look, for example, in the "php_test" folder for "handle_upload_simple.php".
Upload Server Script Requirements (IMPORTANT)
The upload server scripts that you write must meet certain requirements. How you do that will depend on the scripting language that you use. More details will be given in the sections for specific languages.
Format of Uploaded Data
The Recorder Applet uploads its data using an HTTP POST in "multipart/form-data" MIME format. This is the same format that HTML FORMs use. In fact, to the server, ListenUp looks just like a submission from a FORM that includes an uploaded file. This allows one to use standard scripting techniques on the server to receive the file. Rather than duplicate existing documentation, I have included references to some available resources.
Simulate ListenUp using a FORM
To help you write your own server scripts, we have provided HTML code that simulates the ListenUp Applet. It contains an HTML FORM that uploads a file. This lets you develop and debug your server scripts without using ListenUp. More information here.
Uploaded Audio File
Note: the MIME field name for the uploaded file is "userfile". The uploaded file comes with a name but that is just a suggestion from the client. Your script is free to name the file anything you want. Click here for suggestions for naming files on the server.
The content type for Speex files is "audio/x-ogg".
The content type for WAV files is "audio/wav".
Additional Information Uploaded with the Audio File
The following variables are uploaded along with the recording.
You can also upload additional information as name/value pairs using hidden text fields. These could include user names, email addresses, etc.
Returning a Result from Your Script to ListenUp
Integration with a Database
Your upload script can interact with a database. You may want to use a database to keep track of uploaded messages. In that case, we recommend placing the recorded message file in a regular folder, and just putting the filename in the database.
echo "CALLJS alert('Server says Hello using CALLJS');\n";
Continue with Your Server Language
If you are using another scripting language, then look in the documentation for that language of that language for keywords "upload file" and "POST" and "HTML FORM".