I'm testing Hive to store some videos in Flutter. It is ok to use Hive for that purpose?
I think storing video in any type of database is not good idea. Instead of storing video itself in db you can save video to device memory with some filename and store filename alongside other details (eg: length, name, thumbnail url or filename,...) in hive db.
@TheMisir I agree. Unless the database handles objects (byte array of video) different, it is not a good idea to store them in the database.
I was thinking of implementing this in the new Hive version because I often see people using Hive for caching data and storing files.
@TheMisir @leisim Thanks guys, i ended up saving the file in device memory then saving its name inside an object in hive. I was considering using hive, because of its encryption box. I do not want the files being accessed elsewhere, but storing the hole file was not a good practice indeed.
You can encrypt files yourself and store filenames in db.
Most helpful comment
I think storing video in any type of database is not good idea. Instead of storing video itself in db you can save video to device memory with some
filenameand storefilenamealongside other details (eg: length, name, thumbnail url or filename,...) in hive db.https://softwareengineering.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database