logo       

Re: Mason component to output image: msg#00171

web.mason.user

Subject: Re: Mason component to output image



On 22 Jul 2003 at 2:43, Adam Roth wrote:

>
> I want a mason component to output a jpeg. This is what i've tried:
> in httpd.conf:
>
> AddType image/jpeg .mjpg

All this does (AFAIK) is tells Apache to send a content-type:
image/jpeg header along with any files with the .mjpg extension.
What you need to do is configure Mason to serve .mjpg files just
as you configure it to serve .html or .mhtml files. Then in your
component, call $r->content_type('image/jpeg') before sending the
file.

>
> in test.mjpg
> <%perl>
>
> open(FILE,"/robot.jpg");
> while(<FILE>){
> print $_;
> }
> close FILE;
> </%perl>
>
> Running the component just spits back the code within test.mjpg.
>
>
>
> Any ideas?
> Adam



--
Dr. David R. Baird
ZeroFive Web Design
dave@xxxxxxxxxxxxxx
http://www.zerofive.co.uk


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise