mirror of
https://github.com/fergalmoran/podnoms.git
synced 2026-02-09 09:14:14 +00:00
25 lines
589 B
C#
25 lines
589 B
C#
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace PodNoms.Api.Models
|
|
{
|
|
public class ImageFileStorageSettings : FileStorageSettings
|
|
{
|
|
}
|
|
|
|
public class AudioFileStorageSettings : FileStorageSettings
|
|
{
|
|
}
|
|
|
|
public class FileStorageSettings
|
|
{
|
|
public string ContainerName { get; set; }
|
|
public long MaxUploadFileSize { get; set; }
|
|
public string[] AllowedFileTypes { get; set; }
|
|
|
|
public bool IsSupported(string fileName)
|
|
{
|
|
return AllowedFileTypes.Any(s => s == Path.GetExtension(fileName).ToLower());
|
|
}
|
|
}
|
|
} |