Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've a CCK filefield (called 'File')
I'm trying to get the metadata to show up in my views tabular / list displays using the File:Mime Type, File:Size, et al fields.
None of these seem to be appearing?
(PS:- They display fine on the node/*/edit & add pages. Playing time, size, Mime type is displayed properly. It's just the views that are the issue (I've both MimeDetect and FileField meta enabled, running PHP 5.2.x, along with GetId3 1.7.7)
Am I missing something?
Comments
Comment #1
p6 CreditAttribution: p6 commentedeek. Typo in the title.
Comment #2
lmshawl CreditAttribution: lmshawl commentedI'm having a similar issue, which is that I cannot choose to filter by the FileField File filename in Views. I assume this is related?
Comment #3
drewish CreditAttribution: drewish commentedmarked #345377: Views and Filefield Meta? as a duplicate
Comment #4
quicksketchThis isn't a bug report, since Views support has to be manually coded.
I've added Views support to FileField Meta, including all the available fields in the filefield_meta table. I wrote a custom handler for duration (so you can format as mm:ss rather than seconds as a decimal), since I figured that'd be the most frequently used field. We could potentially add more handlers in the future for sample rate and bitrate, but that's for another patch.
These changes are only available in the Drupal 6 version. I'm not going to spend the time building Views support for Drupal 5, since the Views API has been completely rewritten, none of the D6 version can be backported directly.
Comment #5
quicksketchComment #7
jphelan CreditAttribution: jphelan commentedI'm also running both MimeDetect and FileField meta, running PHP 5.2.x, along with GetId3 1.7.9. I have mp3s uploaded through filefield and I want to display their duration in a view. Is that possible?
Comment #8
quicksketchPlease open a support request and not re-open a year-old feature request.
Comment #9
yannickooComment #10
yannickooComment #12
Byfred CreditAttribution: Byfred commentedHow to show Metadata in Views (Drupal 6):
For instance, i'll use a filefield called "field_pdf".
1) Create the view, add a "Relationship" type "Content: field_pdf - fid"
2) Add any fields type "File: field_pdf" (size, mime, play time etc etc etc)
Easy! xD