[Xitami] targeting file downloads

Michael diLorenzo xitami@lists.xitami.org
Wed, 08 Jun 2005 02:44:03 -0400


The challenge here is that after making these changes, no video/mpeg will  
stream in the visitor's browser.  Of course, this may be exactly what  
you're looking for, but it's something to be aware of.

Also, as you mentioned in your first post, I believe, there are several  
ways to do this in php.  PHP is a free application, installs very easily,  
and adds quite a bit of power to your web pages, imo.  I use it very  
extensively on my sites, and it really adds some great content.  It's  
something you might want to look in to.  :-)

Michael

On Wed, 08 Jun 2005 08:34:13 +0200, Marc Doigny <marc@verfaillie.com>  
wrote:

> At 04:12 8/06/05, you wrote:
>
>> > "Marc Doigny" - said:
>> >
>> > The only way you could force the browser not trying to display the  
>> file is
>> > to change the MIME type of the file.
>> >
>> > Change the association from "video/mpeg" to "application/octet-stream"
>> > The visitor will be prompted to "run from current location" or "save".
>>
>> thank you for your interesting suggestion marc!  by this, i assume that  
>> you are talking about editing the individual headers of each of my  
>> files in question.  this is not something i've ever experimented with  
>> before, but something i plan to look into more deeply in the near  
>> future. if it works, it has the potential to fuel my imagination for  
>> other projects which are currently on my back-burners :)
>>
>
> No, you don't have to edit each file.
> The http server adds these headers automatically, using a table located  
> in your configuration file (xitami.cfg)
>
> Example of your xitami.cfg file:
> [Mime]
>      default=*/*                         #   Default MIME type
>
>      #  Text MIME types
>      etx=text/x-setext
>      htm=text/html
>      htp=text/html
>      html=text/html
>      rtx=text/richtext
>      tsv=text/tab-separated-values
>      txt=text/plain
>      .=text/plain                        #   Files with no extension
>
>      #  Image MIME types
>      gif=image/gif
> (and so on)
>
>
> Of course, you could add individual headers to each file (that can be  
> done for cgi applications, so you can send the file in "chunked" mode,  
> or gzip the file or whatever that request non-standard headers) but it's  
> easier with one single configuration file.
> Don't modify the xitami.cfg file, but create (or modify) default.cfg
>
>
> marc
>
> -------------------------------------------------------------------------
> --::Mailserver Verfaillie Bauwens::-- contact : postmaster@verfaillie.com
> Alle mails gecontroleerd op virussen. Virusdefinities dagelijks aangepast
> ----------------------- http://www.verfaillie.com  
> -----------------------  
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/