Skip to content

Instantly share code, notes, and snippets.

@denuno
denuno / gist:5864210
Created June 26, 2013 02:11
handle file upload as stream example
component {
jServletFileUpload = createObject("java","org.apache.commons.fileupload.servlet.ServletFileUpload");
jStreams = createObject("java","org.apache.commons.fileupload.util.Streams");
jByteArrayOutputStream = createObject("java","java.io.ByteArrayOutputStream");
function getFormItems() {
//var out = getPageContext().getResponse().getWriter();
var htRequest = getPageContext().getRequest();
var bao = jByteArrayOutputStream.init();