FileSecurityMiddleware class

Applies restrictions to file uploads to protect your server from common exploits.

maxFileSize should be a size in bytes. allowedExtensions should start with a leading '.'. allowedContentTypes can contain either Strings or ContentTypes.

Constructors

FileSecurityMiddleware({int maxFiles, int maxFileSize, Iterable<String> allowedExtensions, Iterable allowedContentTypes})

Properties

allowedContentTypes Iterable
read / write
allowedExtensions Iterable<String>
read / write
hashCode int
The hash code for this object.
read-only, inherited
maxFiles int
read / write
maxFileSize int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

handleRequest(dynamic req, dynamic res) Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited