Nodes may have attached files, and possibility of changing them via comments is a very useful feature.

CommentFileSizeAuthor
#4 2010-03-05_filefield[unix].patch2.64 KBarhak

Comments

sinasalek’s picture

@arhak :

a filefield has several properties: filesystem path, timestamp, filesize, etc, etc
I have support for multi-dimensional properties, e.g. textfields with input format, and they are considered equals "if and only if" they match in both: the text and the format (nevertheless, until now I have no idea on how to visualize a format change which doesn't reflects on the text, it just shows up as a change, but both sides look the same)
for filefield I was thinking something like considering: filesystem path, timestamp and fid (serial id in files table), don't know if something else might/should get in, or if timestamp/filesize should be ignored

arhak’s picture

+1 subscribing

sinasalek’s picture

My first idea : I don't think that timestamp is important , the combination of file path (in case of using FileField Path or similar modules)/filename/fid seems/description enough to me. Unless we can justify a usage for filesize and timestamp for users.

I'm not familiar with filefield module code , but according to the modules i used so far, it's pretty much extensible. So module may extend it and add more fields, and i think comment_driven should be able to consider this new fields as well.

arhak’s picture

Status: Active » Needs review
StatusFileSize
new2.64 KB

this is the first approach, it takes into account everything (to be compatible with modules extending functionality)
- fid
- list
- data (array in depth, where description goes)
- uid
- filename
- filepath
- filemime
- filesize
- status
- timestamp
- (an anything another module might add)

needs to be tested with:
- description, and other data that might be associated to the file
- filefield_paths
- file_aliases?

Note that leaving a file untouched but changing its "list" flag is (currently) considered a change and the diff is rendered as the file being removed/added as it is actually rendered by filefield upon "list" flag changes

arhak’s picture

Status: Needs review » Fixed

committed to HEAD

arhak’s picture

Version: 6.x-1.x-dev » 6.x-1.0-unstable4

should no longer apply for unstable5

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.