if (username == null)
username = "unknown (this shouldn't happen?)";
String fname = file.getName();
String fsize = Long.toString(file.getSize());
IResourceUploadHandler uploadHook = (IResourceUploadHandler) context.getApplicationContext().getBean("resourceUploadHandler");
uploadHook.onUpload(context, access, overwrite, Integer.parseInt(id), fname, new Double(fsize).doubleValue());
context.info("UPLOADED:" + fname + "," + id + ","
+ context.getIpAddress() + "," + username);