out.write(buff, 0, n);
}
out.flush();
out.close();
Upload up = new Upload();
up.filename = filename;
up.originalname = originalname;
up.contenttype = request.contentType;
up.file = new Blob(((ByteArrayOutputStream)out).toByteArray());
up.insert();
renderText(up.id);
} catch (IOException ioe) {
Logger.error(ioe.getMessage());