Core talk:File Class

From Habari Project

Jump to: navigation, search

Some IRC stuff that skippy and I talked about that might be useful:

(1:46:27 PM) umbrae: I was looking into making an attachments object
(1:46:35 PM) umbrae: for file attachments
(1:48:08 PM) umbrae: I'm looking around for any documentation that would give me some insight on how this has been planned to be architected (if at all) - you guys have any ideas?
(1:52:06 PM) skippy: umbrae, you'd make a class that extends QueryObject, I think.
(1:52:14 PM) skippy: and describe your file attachments in that object.
(1:52:40 PM) umbrae: skippy: Indeed, that's what I've got so far
(1:53:47 PM) umbrae: skippy: Basic stuff overall. I'm more thinking about if there's anything specific about storing in the FS (some sort of path-finding function that can be modified via plugin so people can store their files differently if they want), fields necessary (filename, path, title, description, tags?) etc
(1:54:12 PM) umbrae: Or if you guys wanted to get crazy and use BLOBs (please no :P)
(1:55:11 PM) skippy: umbrae, whatever solution is implemented must respect the multi-site configuration support in Habari
(1:55:31 PM) umbrae: Ah, definitely a good point. I haven't even looked at that stuff yet.
(1:55:32 PM) skippy: I think a /media directory is a safe place to store stuff.   /user/media, or /user/sites/x.y.z/media
(1:56:01 PM) skippy: I think that a multi-site implementation should restrict media uploads to that specific site's /media directory.
(1:56:08 PM) umbrae: *nod*
(1:56:14 PM) skippy: sharing media elements between sites can be implemented via a plugin.
(1:58:35 PM) skippy: I think I'd make the db store the data about the object in a way similar to the postinfo values:  arbitrary name/value pairs as discreet rows in a table.
(1:58:48 PM) skippy: but that would be a good discussion for the mailing list.
(1:59:04 PM) umbrae: Yeah. I'm not 100% on board with that, so I'll check it out and post something.
(1:59:46 PM) umbrae: (Actually, I'm going to disagree with what I just said. With variable information (like width/height for images), I think it might be a good idea)
(2:01:54 PM) skippy: actually, it might be nice to make a generic media class which extends queryrecord, and make it pluggable with "type" and "status" in the same way we did with posts.
(2:02:02 PM) skippy: then a single API can manage all manner of media.
(2:02:16 PM) skippy: and plugins can register new media types at will.
(2:02:47 PM) umbrae: Makes sense to me.
(2:02:51 PM) umbrae: Thanks for the feedback, skippy.
(2:02:55 PM) skippy: cheers

umbrae 20:37, 8 March 2007 (UTC)

Personal tools