Storing binary data in mySQL

[email protected] (Jacob Kruger) Tue, 25 Oct 2016 09:58:12 +0200
Newsgroups php.windows
Message-ID <[email protected]>
I have a minor issue with storing specific types of data in a blob field 
in mySQL.


I am working with PDO, and while it seems to work alright with image 
files, etc., if I try to store a sound clip in the database, using exact 
same code, etc., when I then pull the data out of the database again, 
setting content-disposition, file name, content-type, etc. back to match 
the original values, the audio clips seem to get corrupted when being 
extracted?


Any thoughts on what I need to bear in mind/try while extracting, or 
storing the data?


Can also post the code here, but, thought would first just ask, since 
when I do the exact same thing with image files, they seem fine when 
they then get extracted/rendered.


Suppose should also try some other file types, like documents, PDF 
files, etc., just to test, but, just find it a bit odd that one type of 
file - .jpg, .gif, or .png - works fine, but, others, like .wav, .mp3 
and .ogg don't want to cooperate.


TIA


Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."