|There's more than one way to do things|
Object Label Badly Formattedby Anonymous Monk
|on Mar 05, 2005 at 00:12 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I've got an application that accepts PDF file uploads and stores them in a BLOB column in MySQL. Another application pulls data from the database and sends it to the browser. When the database is queried the BLOB column is written to a file in a public HTML directory and a link is sent to the browser.
My problem is that when users click on the link the Acrobat plug-in loads and then errors out with "Object Label Badly Formatted". If I move the PDF to the directory myself then it loads correctly in the browsers. ls -Fla on the directory shows that the two files (uploaded through the application and copied in with Samba) have sizes that differ by 8 bytes (the uploaded file is larger).
Any ideas of where to look? Here's the code that is accepting the upload: