http://www.masonhq.com/?FAQ:Components#h- 
i_m_trying_to_generate_an_image_or_other_binary_file__but_it_seems_to_be 
_getting_corrupted_

On Nov 15, 2007, at 10:36 AM, Brian Barto wrote:

> Hello all. I am trying to return a binary file from a subcomponent.
> However, the autohandler and requested component (e.g. index.html) are
> being sent to the client along with the binary info, thus corrupting
> the data. Is it possible to get ONLY the output from a subcomponent
> and somehow suppress the requested component and autohandler?
>
> Here is an example stack of what I am dealing with:
>
> autohandler -> index.html -> download.mas
>
> ...where download.mas actually sends the binary info.
>
> Here is the code I am using in my download.mas component:
>
> $r->content_type('application/octet-stream');
> $r->header_out('Content-disposition' => ("attachment;   
> filename=name.bin"));
> $m->print($binary_data);
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a  
> browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to