Page 1 of 1

Playing Audio Files in BLOB fields

PostPosted: Sun Jan 20, 2008 2:52 pm
by ADobkin
I'm trying to create a table with short audio files, such as voicemail messages. I've experimented a bit with BLOB vs. container fields for the uploads, and I'm noticing some inconsistencies. In particular, I would like to use BLOB for the security benefits, but I can't figure out how to get the file to play in the browser like it does with a container field. Instead, the browser treats it as an ordinary file download, and then it has to be played in an external application. I've tried using both WAV and MP3 files. Any suggestions?

Thanks,
Alan

PostPosted: Sun Jan 20, 2008 3:14 pm
by shannah
Ah.. yes. Dataface does set blob fields to download as attachments rather than just load. I suppose this would be a good thing to make optional. If you look in the Datafafce/Application/blob.php file, you'll find a line:
Code: Select all
header('Content-disposition: attachment; filename="'.$filename.'"');

If you comment this line out it will cause blob fields to not download as attachments - hopefully your desired effect.

-Steve

PostPosted: Sun Jan 20, 2008 6:35 pm
by ADobkin
Excellent, thanks!