.wmv extention is treated as text

Discussion in 'General' started by Hellbound, Jan 4, 2007.

  1. Hellbound

    Hellbound New Member

    hi guys,
    when I link a file to an .wmv or many other extention, instead apache pass download command , it will open file in text or somehow html mode and it won't download it.

    any help?

    edit 2008-01-01: I still don't have any solution to make sure that all undefined files are treated as file transfer instead of text

    Last edited: Jan 1, 2008
  2. falko

    falko Super Moderator ISPConfig Developer

    Is wmv listed in /etc/mime.types?
  3. Hellbound

    Hellbound New Member

    no , it is not in that file,
    should I list all extension that must be
    treated as html or text? or other way around?

    my apache on windows did not did the same.

    thanks for reply
  4. falko

    falko Super Moderator ISPConfig Developer

    Please add
    video/x-ms-wmv                                  wmv
    to /etc/mime.types and restart Apache.
  5. Hellbound

    Hellbound New Member

    thanks for the tip,
    do you know how to add any unhandled extentions to that list?
    instead of typing everything?
  6. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    It's up to you (the server owner) to determine which mime types should be supported. Apache comes with a default set. If you want that changed, you might want to add a bugzilla request on the Apache developers list http://issues.apache.org/bugzilla/.
    A one-liner (so you don't have to use an editor) to add an extension is
    echo "video/x-ms-wmv                                  wmv" >> /etc/mimes.types
  7. Hellbound

    Hellbound New Member

    I still can't make it work for unhandled stuff
  8. tensor

    tensor New Member

    You can add

    DefaultType application/octet-stream

    into your /etc/apache2/apache2.conf (on Debian).

    Everything that is unknown will give a file download dialog in a browser.
  9. Hellbound

    Hellbound New Member

    Thanks for the tip, but whats the file in fedora?

    I added this to /etc/httpd/conf/httpd.conf

    and it didn't work out.

    Thanks again.
  10. tensor

    tensor New Member

    Search for existing DefaultType directive, it may be set to text/plain. Set it to application/octet-stream.

Share This Page