Open Closed

Storing blobs in both the database and File System (or Azure, or whatever) #11114

marble68 created

This isn't really a question, just posting this in case anyone needs a solution (and for myself in case I forget and need to do this again).

Basically - when files are uploaded, they're held for a short time in cache, then flushed to the database. This is fine for small files, but if you need large files, or want to encrypt them, etc. there could be a lot of places you have to touch in code.

I have a need to split the storage based on what it is. Profile pics are fine in the database, but what about a large PDF or data you want to encrypt?

As a proof of concept, I tweaked the DbBinaryObjectManager and the BinaryObject, then, instead of returning the IRepsoitory Task directly, I examine the BinaryObject entity which self describes where to find it.

More details can be found here:

No answer yet!