MVC::Neaf::Upload - File upload object for Not Even A Framework
Generally, this class isn't used directly; instead, it's returned by an MVC::Neaf::Request object.
%options may include:
id (required) - the form id by which upload is known.
tempfile - file where upload is stored.
handle - file handle opened for readin. One of these is required.
filename - user-supplied filename. Don't trust this.
utf8 - if set, all data read from the file will be utf8-decoded.
Return upload id.
Get user-supplied file name. Don't trust this value.
Calculate file size.
CAVEAT May return 0 if file is a pipe.
Return file handle, opening temp file if needed.
Return file content (aka slurp), caching it in memory.
CAVEAT May eat up a lot of memory. Be careful...
NOTE This breaks file current position, resetting it to the beginning.
Reset the file to the beginning. Will fail silently on pipes.
This module is part of MVC::Neaf suite.
Copyright 2016-2019 Konstantin S. Uvarin email@example.com.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install MVC::Neaf, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.