开发者

Storing video files in database

I have an application containing database with pictures. I also wanted the database to contain some videos. Is it possible to store videos in databas开发者_运维知识库e by converting them to byte array or other format?


You could store a binary object within a database, but why bother? Simply store the path/file name to the pictures/videos.


The mediastore content provider has a standard way of doing this. On this page look for MediaStore

Documentation

The example is for images, but if you get the mime type right and write the data to the stream correctly it should work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜