htaccess prevents media files being played from files folder

A forum for Bolt related questions / issues

htaccess prevents media files being played from files folder

Postby ningus » Tue Jun 03, 2014 12:29 pm

Hello,

this is maybe a specific problem in Firefox, as it is quiet strict in terms of mime types.

In my project I upload audio files to /files, these files would be played or streamend ok in every browser but Firefox. Firebug console puts out a warning that example.mp3 cannot be played with mime type text/plain.

The .htaccess in /files looks like this:
Code: Select all
# Force plain text showing
ForceType text/plain
<FilesMatch "(?i)\.(gif|jpe?g|png|zip|tgz|txt|md|docx?|pdf|xlsx?|pptx?|html?)$" >
  ForceType none
</FilesMatch>

I ended up adding |mp3? to the list in FilesMatch. Which solved broken audio in Firefox.

My guess is, that restrictions are there for security reasons. Would it be safe, to add more typical media formats?
ningus
 
Posts: 33
Joined: Fri Jun 21, 2013 4:05 pm
Location: Europe

Return to Bolt Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron