开发者

How to store an MP3 file in a a database?

开发者 https://www.devze.com 2023-02-27 08:51 出处:网络
Being new to storing data types in a database, I brought myself upon a problem whereas I need to store a media file inside some sort of database.

Being new to storing data types in a database, I brought myself upon a problem whereas I need to store a media file inside some sort of database. I currently utilize MySQL. Since SO is a community which includes开发者_Python百科 but is not limited to professional programmers, and one of the most high quality question and answer sites(as it pertains to programming), this question may have a fairly simple answer.

That being said, Someone explain to me how to store an abundance of media files inside an SQL database.

Please & Thank you to the stackoverflow.com community.


To store the actual mp3 you need to store it as a blob. A common alternative is to just store a file path. I personally prefer the second approach if possible as they are a lot easier to work with when it comes to refactoring/deploying/testing

0

精彩评论

暂无评论...
验证码 换一张
取 消