Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is this Contour datatype that allows filtering uploads by file type available for Razor? Or is there another?
http://our.umbraco.org/projects/backoffice-extensions/cogworks-cogfilteredupload
Don't think so maybe try getting in touch with Ismail to see if he plans on adding support soon
Thanks Tim. Is there a reason why there is no RegEx field in the standard upload? I've hardcoded one into a custom version in a View which seems to work partially but doesn't like files with capital letters as the file extension:
@model Umbraco.Forms.Mvc.Models.FieldViewModel
<input type="file" name="@Model.Name" id="@Model.Id"
@if(Model.Mandatory){<text> data-val="true" data-val-required="@Model.RequiredErrorMessage"</text>}
@if(Model.Mandatory){<text> data-val-regex="Invalid file type, only png, jpg and gif allowed" data-regex="^.+\.((jpg)|(gif)|(jpeg)|(png)|(JPG)|(GIF)|(JPEG)|(PNG))$"</text>}
/>
@if (!string.IsNullOrEmpty(Model.Value))
{
<br />
<a href="@Model.Value" target"_blank">Show current file</a>
<input type="hidden" name="@{@Model.Name}_file" value="@Model.Value"/>
}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
CogFiltered Upload for Razor
Is this Contour datatype that allows filtering uploads by file type available for Razor? Or is there another?
http://our.umbraco.org/projects/backoffice-extensions/cogworks-cogfilteredupload
Don't think so maybe try getting in touch with Ismail to see if he plans on adding support soon
Thanks Tim. Is there a reason why there is no RegEx field in the standard upload? I've hardcoded one into a custom version in a View which seems to work partially but doesn't like files with capital letters as the file extension:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.