Sometimes you have links to downloadable files and attachments displayed, and besides making that field a clickable link to the actual files for downloads you may also want to display the following file information alongside the link:

  • File Size
  • File Type

To do that using Views, you will need to be able to use and insert the relevant fields. These fields are available in as File Usage.

  1. Go to your Views > Advanced > Relationships

     
  2. Under Relationships, search and add "File Usage"

    Add and insert File Usage, Ok.
     
  3. On the same Views page, under Fields, you should now be able to search and add file type (File: Mime type) and file size fields


     
  4. Done! Go ahead test and format the views display some more.

To avoid duplicates, if appearing, you may:

Add and bind Relationships

  1. Go to your Views page
  2. Add Relationships (in my example, take note of entity bound set between the two relationship items - field ID and file field content)


Set strict query settings

  1. Go to your Views page > Other settings > Query Settings)

     
  2. Select Distinct, Pure Distince (either or both, whichever works best)

 

Leave a Comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
8 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Get reliable web hosting services

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now