logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

HTML::FormFu::Constraint::File::MIME - MIME Type Constraint

Author

       Carl Franks <cpan@fireartist.com>

Description

       Constraint an uploaded file's MIME-type (Content-Type).

       "types" is checked before "regex".

License

       This library is free software, you can redistribute it and/or modify it under the same terms as Perl
       itself.

Methods

types
       Arguments: $mime_type

       Arguments: \@mime_types

       Optional.

       Accepts a single MIME-type or an arrayref of MIME-types. Each is checked against the uploaded file's
       MIME-type (as given by the browser), and the constraint passes if any one of the given types matches.

   regex
       Arguments: $regex

       Optional.

       Accepts a string to be interpreted as a regex, and is checked against the uploaded files's MIME-type (as
       given by the browser).

       The regex uses the "/x" flag, so that whitespace in the given string is ignored.

Name

       HTML::FormFu::Constraint::File::MIME - MIME Type Constraint

See Also

       Is a sub-class of, and inherits methods from HTML::FormFu::Constraint

       HTML::FormFu

Version

       version 2.07

See Also