How to restrict "Documents & Files" to upload

Posted by Community Admin on 04-Aug-2018 09:00

How to restrict "Documents & Files" to upload only certain file types?

All Replies

Posted by Community Admin on 13-Apr-2012 00:00

Hi,

I have a couple of question in "Documents & Files" manager

1-) I need to upload only "jpeg,png,docx and pdf" files to "Documents & Files" from sitefinity 4.4. Can we able to restrict it?

2-) What are the files types the default "Documents & Files" manager will accept?

Thanks




Posted by Community Admin on 13-Apr-2012 00:00

Hi, did you try specifying some file extensions as per teh attached image? not sure if you need the '.' or not. whether it is "PDF,DOCX,etc" or ".PDF,.DOCX,.etc". Play around and see. Hope it helps.
Andrei
Here is teh image too, attcahed.

Posted by Community Admin on 13-Apr-2012 00:00

also, below is a boolean flag that you need to set to true if you want your filter to be enabled.

Posted by Community Admin on 16-Apr-2012 00:00

Hi Andrei ,

Thanks for your reply.

I tried pdf and doc files types in different ways as follows,
1-) doc,pdf
2-) .doc,.pdf
3-) DOC,PDF
4-) .DOC,.PDF

But still it is not working and i can able to upload "txt" file also after the changes done.
Is there any other settings i need to do? Please help me over this.

Thanks

Posted by Community Admin on 16-Apr-2012 00:00

If it doesn't work then it definitely is a bug, but before we assume that:
1 - Have you enabled the filter (that is the text field below) by setting it to "true"?
2 - Once you have specified a filter, have you restarted the application from the IIS?
3 - Before restarting the application from the IIS, have you deleted all the cookies and the browser history?
You can even re-save the Web.config which will also ensure that the WebApplication will refresh all its caches.
Do all that for each combination of file extensions, and if it does not work, then it has to be a bug.

I will say this about Sitefinity, those help prompts under the text fields are a bit useless if they don't have an example of the format that the text entered has to be like. Since you can have comma separated elephants, it would help to see the pattern.

Thanks,
Andrei

This thread is closed