hasFile method

bool hasFile(
  1. String key
)

True when the key holds an uploaded file, or a list of files.

Implementation

bool hasFile(String key) {
  dynamic val = _find(key).value;
  if (val is RequestFile) return true;
  return val is List && val.isNotEmpty && val.every(_isFile);
}