FileController - content disposition
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Extensions
|
||||
{
|
||||
@ -15,17 +16,5 @@ namespace Oqtane.Extensions
|
||||
|
||||
return list.Any(f => s.StartsWith(f));
|
||||
}
|
||||
|
||||
public static string GetMimeType(this string fileName)
|
||||
{
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
|
||||
if (!provider.TryGetContentType(fileName, out var contentType))
|
||||
{
|
||||
contentType = "application/octet-stream";
|
||||
}
|
||||
|
||||
return contentType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user