Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this code streams binary data directly to the page.
- Blob/Data
- pic = test.largeImage[2];
- // Coming From File
- <cffile action="readbinary" file="C:\Inetpub\wwwroot\wireboxdemo\pictures\blog.png" variable="pic"/>
- <cfscript>
- context = getPageContext();
- context.setFlushOutput(false);
- response = context.getResponse().getResponse();
- out = response.getOutputStream();
- response.setContentType("image/png");
- response.setContentLength(arrayLen(pic));
- out.write(pic);
- out.flush();
- out.close();
- </cfscript>
Add Comment
Please, Sign In to add comment