Re: Storing binary data in mySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, the primary issue seems to be with just one file type - .wav - I rewrote the code a bit, working with just PDO, making sure it was all doing what I wanted it to do, and it works fine with .mp3 and .ogg audio clips, but, .wav still gets corrupted, so my guess would be that some form of encoding, or something is causing hassles - this database is set to use inno DB and UTF-8, but anyway.


Either way, for now, will just limit audio clips to those two file formats, and take it from there.


Stay well


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

On 2016-10-25 9:58 AM, Jacob Kruger wrote:
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..."




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux