mbdavid / LiteDB

LiteDB - A .NET NoSQL Document Store in a single data file
http://www.litedb.org
MIT License
8.56k stars 1.25k forks source link

Store liteDB documents in the cloud (azure) blob storage. #1215

Open slimjim10 opened 5 years ago

slimjim10 commented 5 years ago

I am trying to store my local liteDB in the cloud using Azure. We have implemented a REST api which can receive a byte[] but I am having problem getting the liteDB documents to a byte[]. If I try to read the file using File.ReadAllBytes(LiteDbPath) where we have stored the liteDB i get a System.IO.IOException: Sharing violation on path. I assume this is not the way to do this, but I am unable to figure out how to do this. Anyone have any suggestions on how to do this?

It is possible I am using this the wrong way, I am quite unexperienced in this area.

Brannos1970 commented 5 years ago

It sounds as if you are trying to read/write to a secure directory. You will have to upload the file using Azure interface or let your LiteDB code create the file itself.