I can confirm that the same code works on Firefox 3.0.4 - I just ran it up on the older version. So its definitely the 3.0.5 update which has the issue.
Any ideas?

cheers,
Steve







On 9 Jan 2009, at 13:36, Steve Swinsburg wrote:

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