Playing Audio Files in BLOB fields

A place for users and developers of the Xataface to discuss and receive support.

Playing Audio Files in BLOB fields

Postby ADobkin » Sun Jan 20, 2008 2:52 pm

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
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

Postby shannah » Sun Jan 20, 2008 3:14 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ADobkin » Sun Jan 20, 2008 6:35 pm

Excellent, thanks!
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 18 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved