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.