This content has been marked as final. Show 5 replies
When I run their PHP version that works on a Linux System and the Java Applet debugger on this is the result from the time the file is handed off from the Java Applet to the PHP Code.
Can anyone tell if the file is actually being written to the server then PHP is reading it from the server or is it just being written to memory and PHP is reading a variable or memory block for this data?
ListenUp: 49.081, sendRecordedMessage(message_12345.wav)
ListenUp: 49.091, sendRecordedMessage: upload message_12345.wav
ListenUp: 49.101, start upload, freeMem = 3535456, totalMem = 5640192
ListenUp: 49.431, got compressed image, freeMem = 3453040, totalMem = 5640192
ListenUp: 49.671, got MIME data, freeMem = 3387064, totalMem = 5640192
ListenUp: 49.902, MultipartFormDataUploader: POST size = 15733
ListenUp: 49.902, parseStatusLine: HTTP/1.1 100 Continue, len 21
HTTP/1.1 200 OK
Date: Thu, 27 Nov 2008 18:38:07 GMT
raw_name = message_12345.wav
name = message_12345.wav
type = audio/wav
size = 15420
Upload dir = ../uploads
duration = 2.6006349206349206
SUCCESS - message_12345.wav uploaded.
ListenUp: 50.332, DynamicMemoryBuffer: deleting array.
ListenUp: 50.332, finished upload, freeMem = 3487480, totalMem = 5640192
I have never used it. But I was bored and this is what seemed to work for me on windows. If it works great. If not ... oh well I tried ;-)
1. Unpacked files and moved the "listenup" directory to:
2. Downloaded the commons fileupload jar from
[ Download -> http://commons.apache.org/downloads/download_fileupload.cgi ]
.. and placed it in the codebase directory:
3. Created a subdirectory to store my cfm test files:
4. Created two test files. One to display the form and the other to process it on the server.
The form file content is straight out of "use_text_fields.html". I just change the uploadURL to point to my handling page.
<!--- c:\coldfusion8\wwwroot\listenup\listenup_cfm\use_text_fields.html --->
<param name="uploadURL" value="handle_upload_TextFields.cfm">
My handler page uploads the sound file to a subdirectory and writes the results to the a log file. But you can do whatever you want the results:
BTW, as you are debugging and testing watch out for caching!
Thank you for your help on this and for the detailed step by step on how to implement it and get it working on my server! I really appreciate your help!
A few questions that I do have is you say, "BTW, as you are debugging and testing watch out for caching!"
If I have this on a site and let's say there are 20 people or even 50 people using this Java Applet at the same time recording some audio, what potential problems do you see this causing the server?
What would be the best way to avoid this problem?
Is it memory on the server that would be the limiting factor?
When you say watch out for caching what exactly do you mean by that and what is the best way yo avoid it?
Thanks again for all your help!
> If I have this on a site and let's say there are 20 people or even 50 people using this
> Java Applet at the same time recording some audio, what potential problems do you
> see this causing the server?
Since I have not used, I do not know about potential problems other than the usual issues with requests and file uploads: security, server capacity (ie simultaneous requests and file storage), etcetera. But those are not specific to this applet, so there is plenty of material out there on those areas.
Beyond that I would check their documentation for recommendations and known issues. I just put together a rough sample and I did not read much beyond the basics. Just enough to get it working ;-) So your best bet is to check the source.
> When you say watch out for caching what exactly do you mean by that and what is the
> best way yo avoid it?
I just meant there was some browser caching when I ran tests, which threw me off. After making changes, I did not always see the new results in the log files. Not unless I cleared cache. I think using the right cfheaders in the handler page (to specify no cache) should take care of that.