UploadDialog 中的 AllowedFileTypes 是否允许多种文件类型,如果允许,格式是什么?

Does AllowedFileTypes in UploadDialog allow for multiple file types, and if so, what is the format?

如果我只设置一种文件类型,它会正确过滤并允许上传图片。

如果我在 属性 中尝试多种文件类型,它可能会过滤它们,但它总是会出错(下面的屏幕截图)。我尝试输入我想要的两种类型,如 "png, jpg"、"png jpg"、"pngjpg" 和“.png、.jpg”,但其中 none 有效。某些格式会自动设置过滤器以同时显示 *.png、*.jpg,但是当我 select 文件时出现错误。这可以处理多种文件类型吗?

设置字段值:

显示图片:

select图像错误:

您试过使用分号 ; 分隔符吗?

这是标准的 Windows 扩展分隔符,并且有迹象表明 Acumatica 使用此字符进行解析。

/// <summary>
/// Gets or sets string representing file types which are allowed for selecting.
/// </summary>
[Category("Behavior")]
[Description("The string that lists the file types that are allowed for selecting.")]
public string AllowedFileTypes
{
    get
    {
        return this.allowedFileTypes;
    }
    set
    {
        this.allowedFileTypes = "";
        if (string.IsNullOrEmpty(value))
            return;
        this.SetAllowedFileTypes(value.Split(';'));
    }
}