private function createUploadedFile($data)
    {
        if (array_key_exists('tmp_name', $data)) {
            return UploadedFile::create($data);
        }

        $result = [];
        foreach ($data as $key => $datum) {
            $result[$key] = $this->createUploadedFile($datum);
        }
        return $result;
    }