I added an audio field on a user profile. The audio field should play MP3 files. For some MP3 files it works fine for others it doesn't work at all.

For example this works fine: https://ia601208.us.archive.org/1/items/YourSongbonusTrack/17YourSongbonusTrack.mp3

This however doesn't work on the audio field: http://ellie-g.com/downloads/Ellie%20Goulding%20-%20Your%20Song.mp3

  • The one you say doesn't work has an encoded URL which your auto player may not support. Hard to tell so you should really contact the developer regarding this. I copied and pasted both URL's in my browser and they worked fine – Lodder Dec 22 '14 at 15:41
  • What do you mean with "the one that doesn't work as an encoded URL"? The one that does not work has "http". While the one that works has "https". – thadeuszlay Dec 22 '14 at 15:44
  • The http should not make any difference. If you copy and paste the second URL in your browser, the audio file will start playing. When I said URL encoded, I mean it's using %20 instead of spaces so maybe your audio application has some issues with this. Try replacing all spaces in the folder and name of the file with an underscore (_) instead – Lodder Dec 22 '14 at 15:48

URL's are NOT allowed to contain spaces. Your second URL seems to point to a file containing spaces (Ellie Goulding - Your Song.mp3), and at some point it is encoded to replace and whitespace character with %20. It's also possible that your original file name actually contains %20, but that's not possible to tell from your code.

Different browsers (and servers) will handle names with spaces differently, so you should avoid spaces in both folder and file names to be safe. I can't tell exactly where the problem is, but as @Lodder pointed out in his comment, replacing %20 (or spaces) with an underscore _ is a common way to solve this.

From RSC 2396:

2.4.3. Excluded US-ASCII Characters

Although they are disallowed within the URI syntax, we include here a description of those US-ASCII characters that have been excluded and the reasons for their exclusion.

The control characters in the US-ASCII coded character set are not used within a URI, both because they are non-printable and because
they are likely to be misinterpreted by some control mechanisms.

control = <US-ASCII coded characters 00-1F and 7F hexadecimal>

The space character is excluded because significant spaces may
disappear and insignificant spaces may be introduced when URI are
transcribed or typeset or subjected to the treatment of word-
processing programs. Whitespace is also used to delimit URI in many

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.