Hello,
Im using Jdev 11.1.1.4 and using an <af:inputFile> component to upload documents, this is all working fine as I can upload small documents and so whatever but I want to do some validation on large files (e.g. restrict file length). The spec says that I should get an EOF exception if the file size exceeds the default UPLOAD_MAX_DISK_SPACE size but I don't see anything.
The page just refreshes and the file isn't set in my bean. Some snippets of code:
<af:inputFile label="Document to upload:" value="#{myBean.uploadFile}" id="if1"/>
<af:commandButton text="Upload" action="#{myBean.doUpload}" id="cb1"/>
private UploadedFile uploadFile;
public void setUploadFile(UploadedFile uploadFile) {
this.uploadFile = uploadFile;
}
public UploadedFile getUploadFile() {
return uploadFile;
}
public String doUpload(){
//some stuff here
return null;
}
I'm debugging and setting breakpoints in the doUpload() and setUploadFile() methods but they aren't called if the file is too big and I don't see an exception. These breakpoints do halt when the file is small. I'm a bit confused, would have thought I would get an exception or at least see the file go into the bean...
Any ideas?
Cheers,
Ross