WebScriptRequest request, final WebScriptResponse response) {
if (request instanceof AnnotationWebScriptRequest) {
request = ((AnnotationWebScriptRequest) request).getWebScriptRequest();
}
FormField formField = null;
final WebScriptServletRequest req = WebScriptUtil.extractWebScriptServletRequest(request);
if (req != null) {
String parameterName = fileField.value();
if (StringUtils.hasText(parameterName) == false) {
parameterName = name;
}
formField = req.getFileField(parameterName);
}
return formField;
}