What is the property templates for Upload a file

Former Member
Former Member

Hi,

I wanted to provide a feature to upload a file using configurable property in the plugin. 

I have done this feature in Telligent 10x, see the following code snipped.

Property property1 = new Property("PublicKey", "Certificate*", PropertyType.Custom, 3, "")
{
       ControlType = typeof(Controls.CertificatePropertyControl)
}; 

I am trying to do this in Telligent 11x, 

Property property1 = new Property
{
Id = "PublicKey",
LabelText = "Certificate",
DataType = "Custom",
OrderNumber = 0,
DefaultValue = "",
Template= ?
};

Can you please help me to get this done.

Regards,

Aravind Eriventy.

Parents
  • File uploading support is enabled on Url and UrlList property types via the default template by setting allowLocal to true ( see  url Property Template for full documentation -- the options are the same for templates defined in code as for XML-based definitions in widgets/themes/automations). For example,

    Property property1 = new Property
    {
        Id = "PublicKey",
        LabelText = "Certificate",
        DataType = "Custom",
        OrderNumber = 0,
        DefaultValue = "",
        Options = new NameValueCollection
    	{
    		{ "allowLocal", "true" },
    		{ "allowRemote", "false" },
    		{ "enablePreview", "true" }
    	}
    };

    (I also enabled the preview, but you can disable that if you'd prefer)

Reply
  • File uploading support is enabled on Url and UrlList property types via the default template by setting allowLocal to true ( see  url Property Template for full documentation -- the options are the same for templates defined in code as for XML-based definitions in widgets/themes/automations). For example,

    Property property1 = new Property
    {
        Id = "PublicKey",
        LabelText = "Certificate",
        DataType = "Custom",
        OrderNumber = 0,
        DefaultValue = "",
        Options = new NameValueCollection
    	{
    		{ "allowLocal", "true" },
    		{ "allowRemote", "false" },
    		{ "enablePreview", "true" }
    	}
    };

    (I also enabled the preview, but you can disable that if you'd prefer)

Children