Upload module, file attachments, and iTunes podcasting problems

Colin Brumelle - November 17, 2005 - 15:34
Project:upload (simple)
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi,

I've been trying to get mp3's uploaded with the upload.module to work as a podcast in iTunes (with the 'Download method' in settings set to either 'private' or 'public'). I've identified several issues, and have some one-liner patches that solve these problems. First of all, iTunes is extremely flakey with the URL's it can handle, for example spaces in the file name and the '?' character cause it to choke and die. Really? Unbelievable, but true...

Patch number one takes care of the 'spaces in the file name issue' by URL encoding the filename.

If someone has the 'Download method' in settings set to 'private', this means that the URL will contain a '?', as in:
http://mysite.com/system/files?file=blah.mp3
This causes iTunes to die, so the second patch I have here makes all enclosures have full absolute URLs, regardless of the 'Download method'. Even if the download method is private, enclosures appear as full URLs.

When I was experimenting with this, I also noticed a strange bug in Firefox. When the download method is set to private, and the filename has a space in it, firefox (on both mac and PC), tries and saves the file using only the filename up to the first space. For example, if the filename is something like "01 song name.mp3", Firefox tries to save it as "01" (with no mp3 extension). This is solved by putting quotes around the filename in the Content-disposition headers. This is in patch 3.

I think these patches might solve bugs:
http://drupal.org/node/23759 spaces in filename
http://drupal.org/node/34807 firefox upload problem

Thanks!

-------------------
Colin Brumelle

AttachmentSize
upload_spaces_encode.patch615 bytes

#1

Colin Brumelle - November 17, 2005 - 15:35

Second patch for public/private URL's...

AttachmentSize
upload_private_url.patch 756 bytes

#2

Colin Brumelle - November 17, 2005 - 15:36

Third patch for firefox fix...

AttachmentSize
upload_filename_quotes.patch 729 bytes

#3

Colin Brumelle - November 17, 2005 - 17:51
Status:active» needs review

#4

NukeHavoc - January 20, 2006 - 19:45

Just wanted to let you know that I tried out your patches, and they worked perfectly on my 4.6 Drupal install. Thanks for creating them; not being able to use iTunes for RSS was going to be a major headache. :)

#5

sun - October 3, 2007 - 18:36

This is a Drupal core issue. You definitely should test Transliterate filenames module. Please report back if that module works for you (and mark this issue fixed if it does).

 
 

Drupal is a registered trademark of Dries Buytaert.