I have attached a filefield field on my custom content type, and I am trying to add this field inside a view: 'cause of the names of the files too long, I wished to enable the views file function "Trim this field to a maximum length" but it doesn't work as I expected.
I think that the problem is that the views module is trimming the <a href="sites/default/myfilewithverylongfilename.jpg">sites/default/myfilewithverylongfilename.jpg</a> and not only myfilewithverylongfilename.jpg.

Is possibile a fix to pass for trimming to views module only the name of the file and not the entire link?

Similar issue reported on other modules tracker are:
http://drupal.org/node/426704
http://drupal.org/node/581728
http://drupal.org/node/426776

Thanks.

CommentFileSizeAuthor
screenshot_01.png301.11 KBgionn

Comments

quicksketch’s picture

Category: bug » support

I'd suggest using a relationship on your FileField, enabling you to access the File table fields, such as "File: Filename". Then you can trim that field and link it to it's value.

quicksketch’s picture

Status: Active » Closed (fixed)