Closed (fixed)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2010 at 20:40 UTC
Updated:
14 May 2010 at 10:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchAs far as I know, it is not possible to extend FileField to do this. What you are asking is really a more general CCK question about combining any multiple fields. The CCK 3 branch (in CVS only as far as I know) supports the concept of "multigroups" in which you can combine multiple fields together and have the "Add another item" button affect all of them at the same time, but unfortunately this functionality didn't make it in Drupal 7, so now they're not sure what to do with it. Another approach is to simply make a different table, then join to it from Views and do your sorts that way, such as the way FileField Meta provides meta data to views like ID3 tags. The data doesn't necessarily need to be in the same table for you to sort on it, it would just be more efficient if it were.
Comment #2
justageek commentedThanks for your reply. I had thought about that, and I'll check out the filefield meta module, my biggest thing is , now that I have figured out how to combine my new text field with filefield, i need to:
1. tell filefield to do its normal stuff during render, save, etc.
2. also tell drupal to save my text value in my new table.
I think I'm close just have not quite got there yet.
Comment #3
nevets commentedSee Imagefield extended which starting with the 6.x-4.x branch also extends file field.
Comment #4
quicksketchThanks nevets, I hadn't known that, but since it will have to do that in Drupal 7, good to see there's a jump start in the Drupal 6 version.
Comment #5
quicksketchComment #6
kdebaas commentedAnother solution is to look at how filefield_meta does this. Yesterday I adapted the code from this module to create my own which would retrieve specific exif data from imagefields and store it in a database table. The exif fields can be displayed in views lists. The module is attached, have a look at the code. It is a work in progress though, and I may not be aware of any mistakes I have made yet.
(You may have to rename the file to filefield_exif.tar.gz after downloading, since on upload I got this message:
For security reasons, your upload has been renamed to filefield_exif.tar_.gz.