I have audio on my site which is rendered through media module. The audio files are in private folder at sites/files/private

In firefox, all is fine. But in opera 31 and chrome 45 the files do not load. In the browser inspector there is error about not being able to load the mp3s which drupal specifies in the audio element as example.com/system/files/file.mp3. Now, the url given to the audio element is of course not the true url, so I know in the background drupal is taking care of the proper rendering. So why would the rendering fail in opera and chrome?

Here is an example.

  • I am getting a simple 403 response on my chrome: Failed to load resource: the server responded with a status of 403 (Forbidden) http://dev.guitar-dreams.com/system/files/37SLOW.mp3 and Failed to load resource: the server responded with a status of 403 (Forbidden). – Beebee Sep 7 '15 at 22:10
  • Right, the given url is designed to not work directly. Drupal behind the scenes is either using a php script to translate the bogus url into the correct one to be served, or is doing it via javascript. This is working in firefox, but for some reason the behind the scenes process is broken. – Brian Huether Sep 7 '15 at 22:17
  • Firefox 40.0.3 also reports 403 Forbidden. I think maybe you're logged in as an administrator on Firefox but not on the other browsers? Are you sure it's really not just a simple permissions issue? – Beebee Sep 7 '15 at 22:20
  • Haaa, what a coincidence on firefox version number and error code. – Beebee Sep 7 '15 at 22:21
  • Wow, yes, it seems to be only logged in visitors will be able to play the audio. What I am trying to do is at first get it working for anonymous, and then add functionality for guests to be prompted to register in order to hear audio. But either way I wanted the files in a protected folder... Any ideas on how to arrange things this way? – Brian Huether Sep 7 '15 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.