I need file upload form that only accepts pdf-files

Permalink
I am aware that i could limit the file types from file manager but that doesnt work well as it limits the whole site. What is the best way to modify the form block that comes with C5 to make it accept only pdf files?. Is modifying view.php enough or do i need to modify other parts?.

 
TheRealSean replied on at Permalink Reply
TheRealSean
You could limit the files to a particular user group I am unsure if this needs advanced permissions turned on though?

It would limit them for the guest, but other users you could allow to upload other files.

Otherwise I think you need to look at modifying the form block itself to check on post. I think its already in the controller, but you could tweak that to filter only the ones you wanted.
kartaju replied on at Permalink Reply
Thanks for the info. I noticed that by default C5 doesn't allow uploading of php-files so that was enough.