Forum Discussion
fpieressa
Altostratus
Dec 27, 2009Allow or Deny http upload file by extension
Hi! Is there any way to force in a Web Application that only some specific file extentions can be uploaded using Form-based File Upload (RFC 1867)? Using this way, the file is not uploaded in an http...
hoolio
Cirrostratus
Dec 27, 2009In just about every multipart form upload request I've seen (and your example) the file name the client provides is included in the filename parameter. The RFC states it could be specified in an actual HTTP header, but I've never seen that done. In your example, the actual data is passed in the uploadedfile parameter. So you could configure an object of "/upload.php" and possibly two object parameters. filename would be the one you'd restrict the file name extensions with a regex for. If you want to allow binary content to be uploaded, you'd want to define a second parameter named uploadedfile with a type of binary (length check only).
Can you try testing this to confirm it works for your scenario?
Thanks,
Aaron
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
