Using ASP.Net Core netcore 3.1 I have an SQL Server Table with a column of varbinary(MAX) with files uploaded into it. (Was done in ColdFusion) Now with the .Net core I want to display the svg images in the browser. Here is some more info:
In the Model class: public byte[] FileContainer { get; set; } <-- this is the column with the file data
In the Controller it's just a simple:
List userFiles = await _conn.TableName.Where(u => u.OwnerID == ID).ToListAsync(); return View(userFiles);
In the view: @model IEnumerable<Projectname.Models.TableName> … @foreach (var item in Model){
@Html.Raw(item.FileContainer)This just results in "System.Byte[]" being displayed in the browser. How do I make it display the svg file?