Possible fix for mimetype == null problem. Can you check if it works now?