[drupal-devel] [feature] Give file uploads titles

Goba drupal-devel at drupal.org
Mon Sep 12 06:03:21 UTC 2005

Issue status update for 
Post a follow up: 

 Project:      Drupal
 Version:      cvs
 Component:    upload.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Souvent22
 Reported by:  timcn
 Updated by:   Goba
 Status:       patch (code needs review)

+1 on the functionality. We still use a custom file upload module on one
of our sites, since the upload module allows no title (which we use as a
caption) to be associated with an upload.


Previous comments:

Fri, 09 Sep 2005 14:38:57 +0000 : timcn

Attachment: http://drupal.org/files/issues/upload.zip (1.33 KB)

With this patch, you can rename your file uploads. Normally, only the
file name shows up. This adds an additional input field to supply a
title for the file that is displayed instead.


Fri, 09 Sep 2005 15:33:48 +0000 : Souvent22

Attachment: http://drupal.org/files/issues/upload_3.patch (6.37 KB)

Made a better patch in the correct format. But, this is a good patch.
DEF helps to be able to "describe" your file via a label instead of via
the filename. I hope this gets to head soon. It's the little things that
matter. :). I also made the label size larger, from 128 to 255.


Fri, 09 Sep 2005 15:39:59 +0000 : Bèr Kessels


please read http://drupal.org/node/22568 for how to submit patches. 

But besides that, I do not think this feature will make it into drupal.
The current upload system is aimed at simplicity. If you need a differnt
name, you should rename it locally, or use a contributed file managing
module. But that is just my opinion. Others might like it!


Fri, 09 Sep 2005 18:39:15 +0000 : Boris Mann

It's a good idea. Does it make sense to have filename --> filepath
mapping as part of the file API? I would certainly say that that should
be part of the information stored (i.e. there is a column for "name" in
the table), but it would be up to modules to implement this.


Fri, 09 Sep 2005 19:25:57 +0000 : drumm

I don't see a way to edit the description.


Fri, 09 Sep 2005 21:25:36 +0000 : Souvent22

Yes, if you go to the node, and you edit the node, you can edit the
descriptions of the attachments.


Sun, 11 Sep 2005 20:07:29 +0000 : m3avrck

Ber, in contrast, this patch doesn't make uploads anymore complex,
rather provides some much needed functionality. When a file is uploaded
right now, it's name is whatever the name of the document is plus
extension... which as we know how file names are, can sometimes be
quite unreadable. How many people are going to take the time to rename
the file? Not too many people I've noticed (I deal with a client that
has 100s of files, filenames is a *big* issue).

So all this patch does introduce a field to put a name for the file,
makes 100% sense and I think this is *much* needed.

Tested patch, works great.

However, the title field (drumm where did you get description??? this
is only a title field) should have a default value initially after the
upload and this should be set to the filename, as that is how Drupal
works currently. Then, if the user chooses, they can change the display
name of the file, otherwise the default will be the filename, not
breaking nor interfering with how Drupal currently handles files. Very
smooth transition :)

Also, getting a small 'fuzzy' problem when appyling patch on line 404,
please check and reroll clean patch against head, thanks!

More information about the drupal-devel mailing list