Global

Methods

Uxio(optionsopt) → {function}

Description:
  • Express/Connect-compatible middleware for handling multipart/form-data uploads. This middleware parses uploaded files and form fields, making them available on `req.uxio` and `req.body` objects. It automatically cleans up temporary files once the response is finished or closed.
Source:
Parameters:
Name Type Attributes Description
options Object <optional>
Optional configuration for the middleware.
Returns:
Express/Connect-compatible middleware function.
Type
function

Type Definitions

UxioFile

Description:
  • Uxio captures file(s) for a specific route, creates file object(s), places them in the req.uxio.files array
Source:
Properties:
Name Type Description
fieldname string The name of the form field.
filename string The original name of the file.
encoding string The encoding of the file.
mimeType string The MIME type of the file.
tempFilePath string The full path to the temporary file on the disk.
size number The size of the file in bytes.
Uxio captures file(s) for a specific route, creates file object(s), places them in the req.uxio.files array
Type:
  • object

UxioObject

Description:
  • This is the uxio file object passed in the req.uxio, It give yiu control of the uploaded file in the tempCache.
Source:
Properties:
Name Type Description
hasFile function Checks if any file was uploaded in the request.
hasFiles function Checks if files with specific field names exist.
files Array.<UxioFile> An array of objects, each representing an uploaded file.
cleanup function Manually cleans up the temporary cache directory.
This is the uxio file object passed in the req.uxio, It give yiu control of the uploaded file in the tempCache.
Type:
  • object