从数据库中检索MP3文件 [英] Retrieve mp3 file from database

查看:110
本文介绍了从数据库中检索MP3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于如何检索存储在数据库中的byte []数组一个mp3文件,并在表单中显示出来,让用户下载/播放的问题?

I have a question regarding how to retrieve an mp3 file stored as a byte[] array from the database and display it in a form and let the user to download/play it?

推荐答案

嗯。这肯定可以做到的,但如果它是一个RDBMS你真的应该重新考虑的解决方案。 Usualy数据库没有设计或使用大型二进制对象和读写数据是远远beeing最佳优化。

Hmm. This sure can be done but if it is a RDBMS you realy should reconsider the solution. Usualy the database is not designed or optimized for using large binary objects and reading and writing the data is far from beeing optimal.

为什么不存储文件夹中的文件并保存文件级和文件夹名称到数据库?

Why not storing the file in a folder and save the file- and folder-name to the database?

这篇关于从数据库中检索MP3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆