Hi - I'm not sure if this is a bug or a feature, but I noticed that after enabling this module when adding an attachment field, the attachment name appears in an editable box. However, I tried changing the name of the attachment from the actual file name and I am unable to do so. I tried this both on upload and after upload.

Using Firefox 2.0 for Mac.

Thanks!

Comments

cscsteve’s picture

I just tried this. And it works as I expected.

I think the issue is thus:
You can't change the filename itself. The filename you upload as is the filename you get. The "title" and "description" fields only deal with the HTML that gets shown on the node page where the attachments are listed. Perhaps the confusion is the fact the title field is populated by default with the filename. All fine and good. If you change that, it will still show the real filename in parens after the title. Description text goes in a mouse-over title text on the link.

If you go into the file server and change the file name on the commandline, you'll make it so Filemanager can no longer find the file.

I hope that explains how it does work. If it doesn't do as above for you, then you probably have something wrong with your configuration. If you want it to do something else, then a feature request will be considered.

Thanks,
- Steve

knowitalljen’s picture

Thanks for the response. Interestingly, neither the title nor the description show up by default - only the file name. I don't know if the intent is to provide these fields so you can alter your template to pick those fields up, but I am not able to make them show after installing this module.

cscsteve’s picture

After you select a file, and hit 'add', it should upload the file, and then reload the node edit form and provide form fields for that file including description and title. The form area is called "Attachments".

If you see other behavior (and haven't modified the module or theme to exclude the fields), and the form area is called "File attachments", then you're using the core Upload module, not Attachment.

Assuming you're using Upload, not Attachment and you want to use Attachment:
1. Go into your modules config page and disable Upload, and enable both Filemanager and Attachment.
2. Go into access control and set the correct permissions so the users you want can upload and view attachments.
3. Finally you will need to enable the attachment capability under the content types configuration pages. To do this you must go to
"Administer"->"Content management"->"Content types"
and enable the Attachments setting under the Workflow section

I hope that helps.

- Steve

knowitalljen’s picture

Steve - thanks so much. Those steps would be helpful in the documentation - I wasn't aware that you needed to disable the core attachment function (or maybe I overlooked that). I had the core module enabled.

I tested this with drupal's default blog post content type. Interestingly, I get this display:
Filename/Title Size
avatar.pdf 93.7 KB

but the description does not render. Again, should it by default? Or would I need to alter my template to render that field?

Also, I am now able to edit the title. Here's the results:
Filename/Title Size
Change the name! (avatar.pdf) 93.7 KB

Thanks for your help,

Jen

telcontar’s picture

Priority: Normal » Minor
Status: Active » Closed (works as designed)

The description only renders as a "mouseover" by design. The fact that you need to disable core upload has been in the INSTALL file since Oct 2005.

If you want to display the list of files differently, you need to "override" theme_attachments() in your theme by writing your own "yourtheme_attachments()" function. This is part of drupal's design.

telcontar