-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
uForms 9.1.1 and Umbraco 9.1.2
I know it's only a sample template but...
@switch (field.FieldType)
{
case "FieldType.FileUpload.cshtml":
var fileUploadValue = field.GetValue();
if (fileUploadValue != null && !string.IsNullOrEmpty(fileUploadValue.ToString()))
{
<a href="@siteDomain/@fileUploadValue" target="_blank" style="color: #00AEA2;">@fileUploadValue</a>
}
break;
should perhaps now be
switch (field.FieldType)
{
case "FieldType.FileUpload.cshtml":
foreach (var fileUploadValue in field.GetValues())
{
if (fileUploadValue != null && !string.IsNullOrEmpty(fileUploadValue.ToString()))
{
<a href="@siteDomain@fileUploadValue" target="_blank" style="color: #00AEA2;">@fileUploadValue</a>
}
}
break;
Seems to work for single or multiple (as single still gives a single item array for field.GetValues()
)
Also of note.. @siteDomain
seems to include the trailing "/" now.. hence @siteDomain@fileUploadValue