Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

387 B
Raw Blame
namespace Grand.Web.Vendor.Extensions;

public static class FileExtensions
{
    public static IList<string> GetAllowedMediaFileTypes(string allowedFileTypes)
    {
        return string.IsNullOrEmpty(allowedFileTypes)
            ? [".gif", ".jpg", ".jpeg", ".png", ".bmp", ".webp"]
            : allowedFileTypes.Split(',').Select(x => x.Trim().ToLowerInvariant()).ToList();
    }
}