Forum Discussion
SSHSSH_97332
Nimbostratus
Dec 10, 2013ASM - Block Extension @ File upload
I want to block any extension from being uploaded to my Website , i want to allow only ".pdf" extension to be uploaded .
I cann't used allowed / Disallowed file types as this looks on URI , am i ri...
Mike_Maher
Nimbostratus
Dec 10, 2013Use a regular expression to control the value of the parameter (if the value is the file name). This should work, and it is easy to add more file extensions if you like, below I am allow for .pdf and .doc.
(?i).(pdf|doc)$
You will probably also have a parameter that is the actual file upload make sure to set that parameter as a file upload value and check the box to say no .exe. I would also recommend using the feature to offload AV scanning of the file to a Scan Engine of some sort.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects