}
}
} else {
// multipart data
WOMultipartIterator multipartIterator = request.multipartIterator();
WOFormData nextFormData = multipartIterator.nextFormData();
NSDictionary<Object, String> contentDispositionHeaders;
do {
if (nextFormData == null)
break;
contentDispositionHeaders = nextFormData.contentDispositionHeaders();
Object _name = contentDispositionHeaders.objectForKey(Headers.name);
if (uploadName().equals(_name))
break;
nextFormData = multipartIterator.nextFormData();
} while(true);
if(nextFormData == null)
throw new IllegalStateException("AjaxUploadButton: No form data left for WOFileUpload!");
contentDispositionHeaders = nextFormData.contentDispositionHeaders();
String aFileName = null;
if(hasBinding(Bindings.filePath)) {
aFileName = (String) contentDispositionHeaders.valueForKey(Headers.filename);
setFilePath(aFileName);
}
if (hasBinding(Bindings.mimeType)) {
setMimeType((String) contentDispositionHeaders.valueForKey(Headers.contentType));
}
InputStream anInputStream = nextFormData.formDataInputStream();
if(aFileName != null && aFileName.length() > 0) {
if(hasBinding(Bindings.inputStream)) {
setValueForBinding(anInputStream, Bindings.inputStream);
} else {
String localFilePath = null;