request = unwrapMultipartRequest(request);
}
if (request instanceof MultipartRequest)
{
MultipartRequest req = (MultipartRequest) request;
String clientId = getClientId(context);
String contentType = req.getFileContentType(clientId);
String fileName = req.getFileName(clientId);
int fileSize = req.getFileSize(clientId);
ValueBinding dataBinding = getValueBinding("data");
if (dataBinding != null)
{
Class cls = dataBinding.getType(context);
if (cls.isAssignableFrom(InputStream.class))
{
dataBinding.setValue(context, req.getFileInputStream(clientId));
}
else if (cls.isAssignableFrom(byte[].class))
{
dataBinding.setValue(context, req.getFileBytes(clientId));
}
}
ValueBinding vb = getValueBinding("contentType");
if (vb != null)