Hi all,

Just testing an application I have written which works perfectly fine in Safari 3.2.1, but in Firefox 3.0.5 the FileUpload is failing.

Some code:

in form:

//upload form component
FileUploadField uploadField = new FileUploadField("picture");
form.add(uploadField);


in onSubmit() of form:

//get file that was uploaded
FileUpload upload = uploadField.getFileUpload();
if (upload == null) {
        log.error("upload was null.");
        return;
} else if (upload.getSize() == 0) {
        log.error("upload was empty.");
        return;
} else if (!checkContentTypeForImage(upload.getContentType())) {
        log.error("invalid file type uploaded");
        return;
} else {
        String mimeType = upload.getContentType();
        String fileName = upload.getClientFileName();
        
        //get bytes, etc                        
        byte[] imageBytes = upload.getBytes();
}


in Safari 3.2.1 the upload works fine
in Camino 1.6.6 the upload works fine also
in Firefox 3.0.5, the upload is null.

This bit of code hasn't changed for quite some time and last time I tested it it was working fine. Latest Firefox update seems to have killed it.




cheers,
Steve







Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to