1

I need to serve a bunch of gzipped MIDI files from an Apache server. The catch is that when the user requests them, the response should come back with a "audio/midi" content-type header and not a gzip file or multipart header. In other words, Im trying to render the content(play the MIDI) off of the server and not download it to their drive. Is there an easy way I can do this ?

udit
  • 111
  • 1
  • Any reason you can't just unzip them on the server? MIDI files are miniscule! – SpliFF Mar 11 '11 at 04:05
  • So here's the unusual scenario...I have 80-90K MIDI files, all containing repetitive content. And then there need to be 150 versions, each with a different BPM. Which makes this cost about 12-13MB per user uploaded file. It starts to add up really quick. –  Mar 11 '11 at 04:23
  • 1
    possible duplicate of [Serving GZipped MIDI content from Apache has trouble playing in quicktime on browser. Workaround?](http://stackoverflow.com/questions/5280342/serving-gzipped-midi-content-from-apache-has-trouble-playing-in-quicktime-on-brow) – Matt Ball Mar 12 '11 at 03:51

1 Answers1

1

To ensure that Apache looks for randomFile.xyz.gz when the browser randomFile.xyz

Need to add

Options MultiViews

in the apache config.

To ensure the content-type is appropriate, we need to add the following

<Files *.mid.gz>
  SetOutputFilter DEFLATE
  ForceType audio/midi
</Files>