i believe u can extend http request class for that. something along the line of.
of course this is zep, so yeah 2.0 =d
/**
* Gets attached files as Phalcon\Http\Request\File instances
*
* @param boolean notErrored
* @return Phalcon\Http\Request\File[]
*/
public function getUploadFiles(string index, boolean notErrored = false) -> <File[]> | null
{
var superFiles, prefix, input, smoothInput, files, file, dataFile;
if fetch superFiles, _FILES[index] {
let files = [];
if (count(superFiles) > 0) {
for prefix, input in superFiles {
if (typeof input["name"] == "array") {
let smoothInput = this->smoothFiles(input["name"], input["type"], input["tmp_name"], input["size"], input["error"], prefix);
for file in smoothInput {
if (notErrored == false || file["error"] == UPLOAD_ERR_OK) {
let dataFile = [
"name": file["name"],
"type": file["type"],
"tmp_name": file["tmp_name"],
"size": file["size"],
"error": file["error"]
];
let files[] = new File(dataFile, file["key"]);
}
}
} else {
if (notErrored == false || input["error"] == UPLOAD_ERR_OK) {
let files[] = new File(input, prefix);
}
}
}
}
return files;
}
return null;
}