3

I am looking for a way to restrict MIME Types on files uploaded through a WFFM form. What I am really hoping for is a way to control the allowed MIME Types using the rules engine. Even if the solution doesn't use the rules engine, it may still help and is still welcome.

Update: We are using our own custom File Upload field that inherits from the OOTB one. I would prefer to not have to rewrite or modify this field for this solution to work, but I will if I absolutely must.

I am using Sitecore 8.1u2 and WFFM 8.1.160304 in an MVC solution.

4

1 Answer 1

3

I know that you are looking for a way to do it via the Rules Engine. However, you can do it with a custom field validator.

You can restrict the MIME types that are passed to the custom validator through a parameter named MimeTypesNotAllowed, and these are injected into a property of the same name and map them in Sitecore.

Take a look at https://sitecorejunkie.com/2014/04/06/restrict-certain-files-from-being-attached-to-web-forms-for-marketers-forms-in-sitecore/

2
  • Thanks!let me know if you run into issues by opening a NTT quest.
    – C Sigmon
    Dec 30, 2016 at 0:18
  • Does the suggestion above by @CSigmon applicable to Sitecore 8.1 Update 3 and WFFM 8.1 160523 ? I've tried it and it seems not working on my end.
    – Jovit Mayo
    Oct 25, 2017 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.