TedPride has asked for the wisdom of the Perl Monks concerning the following question:

I'm storing files in a database in 64K chunks, then retrieving them to serve them to the viewer. This involves giving the following headers:
Content-Type: video/x-ms-wmv Content-Length: FILESIZE HERE Content-Disposition: attachment; filename=FILENAME HERE
...then printing the contents of the file as they are retrieved from the database. It works just fine for -downloading- the file, but when I try to show it in a player:
<object type="video/x-ms-wmv" data="PATH TO SCRIPT / FILE" width="WIDT +H" height="HEIGHT"> <param name="src" value=""PATH TO SCRIPT / FILE"> <param name="autoStart" value="0"> <a href="PATH TO SCRIPT / FILE">Download File</a> </object>
It shows the player and then dies. I know the file serves correctly, since I can download it and play it locally, and I know the player works correctly, since if I FTP in the file and point to it directly rather than to my file serve script, it loads, so the error must be in how I'm doing my headers. Has anyone run into this problem, and is there an easy fix that doesn't involve storing the files in a directory rather than a database?