Hello, this should be easy, if the DB stores the info what the uploaded file format was, along with the BLOB column. Original file name should suffice for this, since the code can then take the extension as the format info.
If it's just a bare blob column, with no other info, it'll be a bit harder since then it'll be necessary to detect the file format from the binary data itself, but for a reasonable set of formats this should be still doable, even though it'll take a bit more work, since most formats contain a header on the start of the file itself.
What framework are you using for the rest of the site? MVC, Blazor, something else...?