Welcome, Guest
Username Password: Remember me

Spaces in filenames!
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Spaces in filenames!

Spaces in filenames! 01 May 2009 09:01 #818

I've got my mp3s hosted on a media-hosting website. The filenames have spaces in them, and I can create a link that includes spaces--it works fine, if I paste it into my browser URL.

If I paste that link into the Filename field on a media file, it also works fine--but it changes all the spaces to %20. Which makes me sad, because when people download it, instead of getting this:

2009-04-29 - Pastor Bob - Amazing Sermon.mp3

they get this:

2009-04-29%20-%20Pastor Bob%20-%20Amazing%20Sermon.mp3

Is there any way to get the links working with spaces?

Re:Spaces in filenames! 01 May 2009 09:17 #822

  • Eugen
  • OFFLINE
  • Moderator
  • Posts: 147
From what I know (and I've experienced), different browsers interpret spaces in filenames differently. I wouldn't recommend adding spaces in the filenames for that reason.

can you send me a link to see exactly what's happending?

Re:Spaces in filenames! 01 May 2009 10:05 #825

Here it is:
Study

And here's the direct link to the mp3:
With %20
With spaces

You might be right--I might need to go back and rename all the files. I hope not. When I started setting up the archive, I felt comfortable using spaces because I've seen it pretty often, working without a hitch. (I remember that in the early days of the web, you couldn't use spaces at all--but I think I'd gotten the impression that the problem was fixed in modern browsers.)


Hmm. Interesting. When I right-click-and-save either of these links, it gives me a filename with spaces--the %20's get translated when Firefox saves the file. (This might be something that the bulletin board is doing.) But when I click on the download link in the Study view, I get the %20's.

I was just peeking at the headers y'all send, using the Live HTTP Headers add-on for Firefox. I saw this line:

Content-Disposition: attachment; filename=2009-04-26%20-%20Geno%20-%20Jesus%20Really%20Really%20Cares.mp3

Is it possible to change that to something like this?
Content-Disposition: attachment; filename="2009-04-26 - Geno - Jesus Really Really Cares.mp3"

Would spaces the in Content-Disposition field be a problem for some browsers, like it is in the link?

Re:Spaces in filenames! 01 May 2009 10:14 #826

OK, OK...I googled the issue, and I submit to the collective wisdom of The Web on this matter. I'll probably rename my file from this:

2009-04-26 - Pastor Geno - Jesus Really Really Cares.mp3

to this:

2009-04-26_Pastor.Geno_Jesus.Really.Really.Cares.mp3

(Unless someone has a suggestion for a better format?)

Re:Spaces in filenames! 01 May 2009 11:18 #827

  • Eugen
  • OFFLINE
  • Moderator
  • Posts: 147
Probably underscores would work best.

If you have a large amount of files, you can use a script to rename them all (replacing the " " with an "_")

Re:Spaces in filenames! 01 May 2009 11:34 #828

I don't want to just change all spaces to underscores, because that yields:

2009-04-26_-_Pastor_Geno_-_Jesus_Really_Really_Cares.mp3

So, I want to maintain some distinction between the separate "fields" in the filename. I'm thinking about these options, with bold formatting around the ones I'm leaning toward.

2009-04-26_Pastor.Geno_Jesus.Really.Really.Cares.mp3
2009-04-26-Pastor_Geno-Jesus_Really_Really_Cares.mp3
2009.04.26-Pastor.Geno-Jesus.Really.Really.Cares.mp3
2009.04.26_Pastor.Geno_Jesus.Really.Really.Cares.mp3

(I like the last better than the second, too.)
  • Page:
  • 1
  • 2
Time to create page: 1.14 seconds