开发者

Storing video files in database

开发者 https://www.devze.com 2023-03-16 12:54 出处:网络
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

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

精彩评论

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