Accepted file types not restricting upload

Accepted file types not restricting upload

by Mark Fischer -
Number of replies: 1

For the field of type file it allows you to restrict the acceptable file types (any, html, image) but dataforms does not enforce this restriction when someone enters the form.  I have a file field set up where "Accepted file types" is set to "Image files." I am still able to upload PDF files.  I am using Moodle 3.0.4+ (Build: 20160609) and Dataform 3.0.4 (Build: 2015111604).

How do you restrict the types of files that users can upload?

Average of ratings: -
In reply to Mark Fischer

Re: Accepted file types not restricting upload

by Itamar Tzadok -

Yes, apparently the core handling of the accepted types parameters changed at some point to the effect that it stopped working in the dataform. So it's now a dataform issue and you can open a tracker issue in the Set: Dataform tracker. smile