Android Question Save video and audio in MySql

sight

Member
Licensed User
Longtime User
Colleagues, I have to record video and audio in a MySql database, whether BLOB or String field. Someone knows how to do it? If you can give me a code snippet. Thank you.
 

KMatle

Expert
Licensed User
Longtime User
video and audio in a MySql database

Really in a database? Ok... See here: https://www.b4x.com/android/forum/threads/b4x-bytes-to-file.70111/ It's about to read a file into a bytes array. After that you can Base64 encode it to a very long string and store it as a LONGTEXT in you db (up to 16 GB)

Please notice that there are RAM limits! Even the uploads may take some time and your server configuration maybe doesn't accept such big data. Maybe it's better to use ftp to upload the data as files. Please take care of any copyrights, too.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
That would be a lot of data for a Blob or String in an Database field. I would think it would be better to save the files locally and store the URL to the database.
 
Upvote 0
Top