HTML::...::Size(3pm)

πŸ“¦
version 2.07000 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– HTML::FormFu::Constraint::File::Size πŸ’–

okay bestie, welcome to the manual page for HTML::FormFu::Constraint::File::Size, a little Perl module that's out here doing the absolute most so your uploads don't get out of pocket ✨

🌸 VERSION 🌸

version 2.07 β€” yes queen, she's got a version number and she's proud of it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: this thing makes sure an uploaded file meets your minimum or maximum size constraints. That's it. That's the whole job. And she does it flawlessly 🫢

Think of it like a bouncer for your file uploads. Too smol? Not on her watch. Too chonky? Also not on her watch. She's just checking the size and giving you a yes or a no, no cap πŸ’…


✨ METHODS ✨

πŸ‘‘ minimum

πŸ‘‘ min

Optional, so you don't have to use her, but like… why wouldn't you?

This sets the minimum file size in bytes.

min is an alias for minimum β€” same energy, shorter name, pick whichever one speaks to your soul πŸ’–

πŸ‘‘ maximum

πŸ‘‘ max

Optional too, she's chill like that.

This sets the maximum file size in bytes.

max is an alias for maximum β€” literally the same thing, just shorter. iykyk 🌈

πŸŽ€ minimum_kilobyte

πŸŽ€ min_kilobyte

It's giving shortcut energy ✨

This is a shortcut for:

$constraint->minimum( $value * 1024 )

So instead of doing the math yourself, you just hand her a kilobyte number and she handles the rest. Obsessed.

min_kilobyte is an alias for minimum_kilobyte. Same deal, cuter name 🌸

πŸŽ€ maximum_kilobyte

πŸŽ€ max_kilobyte

Another shortcut, another slay πŸ’…

Shortcut for:

$constraint->maximum( $value * 1024 )

max_kilobyte is an alias for maximum_kilobyte. Periodt.

🧚 minimum_megabyte

🧚 min_megabyte

Now we're talking big numbers, main character energy only πŸ‘‘

Shortcut for:

$constraint->minimum( $value * 1_048_576 )

min_megabyte is an alias for minimum_megabyte β€” go off, bestie πŸ¦‹

🧚 maximum_megabyte

🧚 max_megabyte

The final form of the shortcut family, and she ate πŸ“

Shortcut for:

$constraint->maximum( $value * 1_048_576 )

max_megabyte is an alias for maximum_megabyte. No notes, flawless 🌟


πŸ’œ SEE ALSO πŸ’œ

  • Is a sub-class of, and inherits methods from HTML::FormFu::Constraint β€” so all that inherited goodness is yours too, bestie 🫢
  • HTML::FormFu β€” the whole parent situation, go read up πŸ’–

🌟 AUTHOR 🌟

Carl Franks, cfranks@cpan.org β€” the icon who made this happen, we stan πŸ™Œ


πŸŽ€ LICENSE πŸŽ€

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. Free as in freedom, free as in slay πŸ’…


🌟 AUTHOR 🌟

Carl Franks <cpan@fireartist.com> β€” yes, the same legend, showing up again because he contains multitudes πŸ‘‘


This software is copyright (c) 2018 by Carl Franks.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


🫢 quick vibe check: this page was rendered from perl v5.28.1 and dated 2019-01-12. That's the whole footer, babe β€” thanks for reading, you're doing amazing, mwah πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from